summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/qlogic_stub.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-05 10:45:09 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:15:57 +0200
commitfd238232cd0ff4840ae6946bb338502154096d88 (patch)
treed20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/scsi/pcmcia/qlogic_stub.c
parenta78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff)
downloadlinux-stable-fd238232cd0ff4840ae6946bb338502154096d88.tar.gz
linux-stable-fd238232cd0ff4840ae6946bb338502154096d88.tar.bz2
linux-stable-fd238232cd0ff4840ae6946bb338502154096d88.zip
[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device
Embed dev_link_t into struct pcmcia_device(), as they basically address the same entity. The actual contents of dev_link_t will be cleaned up step by step. This patch includes a bugfix from and signed-off-by Andrew Morton. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/scsi/pcmcia/qlogic_stub.c')
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 4f28589bbf34..c6b3e9587ff3 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -91,7 +91,7 @@ static struct scsi_host_template qlogicfas_driver_template = {
/*====================================================================*/
typedef struct scsi_info_t {
- dev_link_t link;
+ struct pcmcia_device *p_dev;
dev_node_t node;
struct Scsi_Host *host;
unsigned short manf_id;
@@ -159,7 +159,7 @@ err:
static int qlogic_attach(struct pcmcia_device *p_dev)
{
scsi_info_t *info;
- dev_link_t *link;
+ dev_link_t *link = dev_to_instance(p_dev);
DEBUG(0, "qlogic_attach()\n");
@@ -168,7 +168,7 @@ static int qlogic_attach(struct pcmcia_device *p_dev)
if (!info)
return -ENOMEM;
memset(info, 0, sizeof(*info));
- link = &info->link;
+ info->p_dev = p_dev;
link->priv = info;
link->io.NumPorts1 = 16;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
@@ -179,9 +179,6 @@ static int qlogic_attach(struct pcmcia_device *p_dev)
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.Present = PRESENT_OPTION;
- link->handle = p_dev;
- p_dev->instance = link;
-
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
qlogic_config(link);
@@ -278,7 +275,7 @@ static void qlogic_config(dev_link_t * link)
}
sprintf(info->node.dev_name, "scsi%d", host->host_no);
- link->dev = &info->node;
+ link->dev_node = &info->node;
info->host = host;
out: