diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-05 04:45:09 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:57 -0500 |
commit | fd238232cd0ff4840ae6946bb338502154096d88 (patch) | |
tree | d20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/scsi/pcmcia/qlogic_stub.c | |
parent | a78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff) |
[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.c | 11 |
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 = { | |||
91 | /*====================================================================*/ | 91 | /*====================================================================*/ |
92 | 92 | ||
93 | typedef struct scsi_info_t { | 93 | typedef struct scsi_info_t { |
94 | dev_link_t link; | 94 | struct pcmcia_device *p_dev; |
95 | dev_node_t node; | 95 | dev_node_t node; |
96 | struct Scsi_Host *host; | 96 | struct Scsi_Host *host; |
97 | unsigned short manf_id; | 97 | unsigned short manf_id; |
@@ -159,7 +159,7 @@ err: | |||
159 | static int qlogic_attach(struct pcmcia_device *p_dev) | 159 | static int qlogic_attach(struct pcmcia_device *p_dev) |
160 | { | 160 | { |
161 | scsi_info_t *info; | 161 | scsi_info_t *info; |
162 | dev_link_t *link; | 162 | dev_link_t *link = dev_to_instance(p_dev); |
163 | 163 | ||
164 | DEBUG(0, "qlogic_attach()\n"); | 164 | DEBUG(0, "qlogic_attach()\n"); |
165 | 165 | ||
@@ -168,7 +168,7 @@ static int qlogic_attach(struct pcmcia_device *p_dev) | |||
168 | if (!info) | 168 | if (!info) |
169 | return -ENOMEM; | 169 | return -ENOMEM; |
170 | memset(info, 0, sizeof(*info)); | 170 | memset(info, 0, sizeof(*info)); |
171 | link = &info->link; | 171 | info->p_dev = p_dev; |
172 | link->priv = info; | 172 | link->priv = info; |
173 | link->io.NumPorts1 = 16; | 173 | link->io.NumPorts1 = 16; |
174 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 174 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
@@ -179,9 +179,6 @@ static int qlogic_attach(struct pcmcia_device *p_dev) | |||
179 | link->conf.IntType = INT_MEMORY_AND_IO; | 179 | link->conf.IntType = INT_MEMORY_AND_IO; |
180 | link->conf.Present = PRESENT_OPTION; | 180 | link->conf.Present = PRESENT_OPTION; |
181 | 181 | ||
182 | link->handle = p_dev; | ||
183 | p_dev->instance = link; | ||
184 | |||
185 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 182 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
186 | qlogic_config(link); | 183 | qlogic_config(link); |
187 | 184 | ||
@@ -278,7 +275,7 @@ static void qlogic_config(dev_link_t * link) | |||
278 | } | 275 | } |
279 | 276 | ||
280 | sprintf(info->node.dev_name, "scsi%d", host->host_no); | 277 | sprintf(info->node.dev_name, "scsi%d", host->host_no); |
281 | link->dev = &info->node; | 278 | link->dev_node = &info->node; |
282 | info->host = host; | 279 | info->host = host; |
283 | 280 | ||
284 | out: | 281 | out: |