summaryrefslogtreecommitdiff
path: root/drivers/scsi/pcmcia/fdomain_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pcmcia/fdomain_stub.c')
-rw-r--r--drivers/scsi/pcmcia/fdomain_stub.c44
1 files changed, 15 insertions, 29 deletions
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
index 06254f46a0dd..914040684079 100644
--- a/drivers/scsi/pcmcia/fdomain_stub.c
+++ b/drivers/scsi/pcmcia/fdomain_stub.c
@@ -59,16 +59,6 @@ MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
MODULE_DESCRIPTION("Future Domain PCMCIA SCSI driver");
MODULE_LICENSE("Dual MPL/GPL");
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0);
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"fdomain_cs.c 1.47 2001/10/13 00:08:52 (David Hinds)";
-#else
-#define DEBUG(n, args...)
-#endif
-
/*====================================================================*/
typedef struct scsi_info_t {
@@ -86,7 +76,7 @@ static int fdomain_probe(struct pcmcia_device *link)
{
scsi_info_t *info;
- DEBUG(0, "fdomain_attach()\n");
+ dev_dbg(&link->dev, "fdomain_attach()\n");
/* Create new SCSI device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
@@ -99,7 +89,6 @@ static int fdomain_probe(struct pcmcia_device *link)
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.IOAddrLines = 10;
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
@@ -111,7 +100,7 @@ static int fdomain_probe(struct pcmcia_device *link)
static void fdomain_detach(struct pcmcia_device *link)
{
- DEBUG(0, "fdomain_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "fdomain_detach\n");
fdomain_release(link);
@@ -120,9 +109,6 @@ static void fdomain_detach(struct pcmcia_device *link)
/*====================================================================*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
static int fdomain_config_check(struct pcmcia_device *p_dev,
cistpl_cftable_entry_t *cfg,
cistpl_cftable_entry_t *dflt,
@@ -137,20 +123,22 @@ static int fdomain_config_check(struct pcmcia_device *p_dev,
static int fdomain_config(struct pcmcia_device *link)
{
scsi_info_t *info = link->priv;
- int last_ret, last_fn;
+ int ret;
char str[22];
struct Scsi_Host *host;
- DEBUG(0, "fdomain_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "fdomain_config\n");
- last_ret = pcmcia_loop_config(link, fdomain_config_check, NULL);
- if (last_ret) {
- cs_error(link, RequestIO, last_ret);
+ ret = pcmcia_loop_config(link, fdomain_config_check, NULL);
+ if (ret)
goto failed;
- }
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
- CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
/* A bad hack... */
release_region(link->io.BasePort1, link->io.NumPorts1);
@@ -162,11 +150,11 @@ static int fdomain_config(struct pcmcia_device *link)
host = __fdomain_16x0_detect(&fdomain_driver_template);
if (!host) {
printk(KERN_INFO "fdomain_cs: no SCSI devices found\n");
- goto cs_failed;
+ goto failed;
}
if (scsi_add_host(host, NULL))
- goto cs_failed;
+ goto failed;
scsi_scan_host(host);
sprintf(info->node.dev_name, "scsi%d", host->host_no);
@@ -175,8 +163,6 @@ static int fdomain_config(struct pcmcia_device *link)
return 0;
-cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
fdomain_release(link);
return -ENODEV;
@@ -188,7 +174,7 @@ static void fdomain_release(struct pcmcia_device *link)
{
scsi_info_t *info = link->priv;
- DEBUG(0, "fdomain_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "fdomain_release\n");
scsi_remove_host(info->host);
pcmcia_disable_device(link);