summaryrefslogtreecommitdiff
path: root/drivers/scsi/pcmcia/sym53c500_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-05 12:45:09 +0300
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 19:15:57 +0400
commitfd238232cd0ff4840ae6946bb338502154096d88 (patch)
treed20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/scsi/pcmcia/sym53c500_cs.c
parenta78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff)
downloadlinux-fd238232cd0ff4840ae6946bb338502154096d88.tar.xz
[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/sym53c500_cs.c')
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 2bce7b070a4e..1ef3109418c9 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -202,7 +202,7 @@ static char *version =
/* ================================================================== */
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;
@@ -829,7 +829,7 @@ next_entry:
data->fast_pio = USE_FAST_PIO;
sprintf(info->node.dev_name, "scsi%d", host->host_no);
- link->dev = &info->node;
+ link->dev_node = &info->node;
info->host = host;
if (scsi_add_host(host, NULL))
@@ -899,7 +899,7 @@ static int
SYM53C500_attach(struct pcmcia_device *p_dev)
{
struct scsi_info_t *info;
- dev_link_t *link;
+ dev_link_t *link = dev_to_instance(p_dev);
DEBUG(0, "SYM53C500_attach()\n");
@@ -908,7 +908,7 @@ SYM53C500_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;
@@ -919,9 +919,6 @@ SYM53C500_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;
SYM53C500_config(link);