aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/qlogic_stub.c
diff options
context:
space:
mode:
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 = {
91/*====================================================================*/ 91/*====================================================================*/
92 92
93typedef struct scsi_info_t { 93typedef 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:
159static int qlogic_attach(struct pcmcia_device *p_dev) 159static 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
284out: 281out: