diff options
Diffstat (limited to 'drivers/scsi/pcmcia/nsp_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index e41e1febe895..23548fbf4898 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1596,8 +1596,8 @@ static int nsp_eh_host_reset(Scsi_Cmnd *SCpnt) | |||
1596 | static int nsp_cs_attach(struct pcmcia_device *p_dev) | 1596 | static int nsp_cs_attach(struct pcmcia_device *p_dev) |
1597 | { | 1597 | { |
1598 | scsi_info_t *info; | 1598 | scsi_info_t *info; |
1599 | dev_link_t *link; | ||
1600 | nsp_hw_data *data = &nsp_data_base; | 1599 | nsp_hw_data *data = &nsp_data_base; |
1600 | dev_link_t *link = dev_to_instance(p_dev); | ||
1601 | 1601 | ||
1602 | nsp_dbg(NSP_DEBUG_INIT, "in"); | 1602 | nsp_dbg(NSP_DEBUG_INIT, "in"); |
1603 | 1603 | ||
@@ -1605,7 +1605,7 @@ static int nsp_cs_attach(struct pcmcia_device *p_dev) | |||
1605 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 1605 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
1606 | if (info == NULL) { return -ENOMEM; } | 1606 | if (info == NULL) { return -ENOMEM; } |
1607 | memset(info, 0, sizeof(*info)); | 1607 | memset(info, 0, sizeof(*info)); |
1608 | link = &info->link; | 1608 | info->p_dev = p_dev; |
1609 | link->priv = info; | 1609 | link->priv = info; |
1610 | data->ScsiInfo = info; | 1610 | data->ScsiInfo = info; |
1611 | 1611 | ||
@@ -1630,9 +1630,6 @@ static int nsp_cs_attach(struct pcmcia_device *p_dev) | |||
1630 | link->conf.IntType = INT_MEMORY_AND_IO; | 1630 | link->conf.IntType = INT_MEMORY_AND_IO; |
1631 | link->conf.Present = PRESENT_OPTION; | 1631 | link->conf.Present = PRESENT_OPTION; |
1632 | 1632 | ||
1633 | link->handle = p_dev; | ||
1634 | p_dev->instance = link; | ||
1635 | |||
1636 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 1633 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
1637 | nsp_cs_config(link); | 1634 | nsp_cs_config(link); |
1638 | 1635 | ||
@@ -1853,12 +1850,12 @@ static void nsp_cs_config(dev_link_t *link) | |||
1853 | scsi_scan_host(host); | 1850 | scsi_scan_host(host); |
1854 | 1851 | ||
1855 | snprintf(info->node.dev_name, sizeof(info->node.dev_name), "scsi%d", host->host_no); | 1852 | snprintf(info->node.dev_name, sizeof(info->node.dev_name), "scsi%d", host->host_no); |
1856 | link->dev = &info->node; | 1853 | link->dev_node = &info->node; |
1857 | info->host = host; | 1854 | info->host = host; |
1858 | 1855 | ||
1859 | #else | 1856 | #else |
1860 | nsp_dbg(NSP_DEBUG_INIT, "GET_SCSI_INFO"); | 1857 | nsp_dbg(NSP_DEBUG_INIT, "GET_SCSI_INFO"); |
1861 | tail = &link->dev; | 1858 | tail = &link->dev_node; |
1862 | info->ndev = 0; | 1859 | info->ndev = 0; |
1863 | 1860 | ||
1864 | nsp_dbg(NSP_DEBUG_INIT, "host=0x%p", host); | 1861 | nsp_dbg(NSP_DEBUG_INIT, "host=0x%p", host); |
@@ -1962,7 +1959,7 @@ static void nsp_cs_release(dev_link_t *link) | |||
1962 | #else | 1959 | #else |
1963 | scsi_unregister_host(&nsp_driver_template); | 1960 | scsi_unregister_host(&nsp_driver_template); |
1964 | #endif | 1961 | #endif |
1965 | link->dev = NULL; | 1962 | link->dev_node = NULL; |
1966 | 1963 | ||
1967 | if (link->win) { | 1964 | if (link->win) { |
1968 | if (data != NULL) { | 1965 | if (data != NULL) { |