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/sym53c500_cs.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/sym53c500_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 11 |
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 = | |||
202 | /* ================================================================== */ | 202 | /* ================================================================== */ |
203 | 203 | ||
204 | struct scsi_info_t { | 204 | struct scsi_info_t { |
205 | dev_link_t link; | 205 | struct pcmcia_device *p_dev; |
206 | dev_node_t node; | 206 | dev_node_t node; |
207 | struct Scsi_Host *host; | 207 | struct Scsi_Host *host; |
208 | unsigned short manf_id; | 208 | unsigned short manf_id; |
@@ -829,7 +829,7 @@ next_entry: | |||
829 | data->fast_pio = USE_FAST_PIO; | 829 | data->fast_pio = USE_FAST_PIO; |
830 | 830 | ||
831 | sprintf(info->node.dev_name, "scsi%d", host->host_no); | 831 | sprintf(info->node.dev_name, "scsi%d", host->host_no); |
832 | link->dev = &info->node; | 832 | link->dev_node = &info->node; |
833 | info->host = host; | 833 | info->host = host; |
834 | 834 | ||
835 | if (scsi_add_host(host, NULL)) | 835 | if (scsi_add_host(host, NULL)) |
@@ -899,7 +899,7 @@ static int | |||
899 | SYM53C500_attach(struct pcmcia_device *p_dev) | 899 | SYM53C500_attach(struct pcmcia_device *p_dev) |
900 | { | 900 | { |
901 | struct scsi_info_t *info; | 901 | struct scsi_info_t *info; |
902 | dev_link_t *link; | 902 | dev_link_t *link = dev_to_instance(p_dev); |
903 | 903 | ||
904 | DEBUG(0, "SYM53C500_attach()\n"); | 904 | DEBUG(0, "SYM53C500_attach()\n"); |
905 | 905 | ||
@@ -908,7 +908,7 @@ SYM53C500_attach(struct pcmcia_device *p_dev) | |||
908 | if (!info) | 908 | if (!info) |
909 | return -ENOMEM; | 909 | return -ENOMEM; |
910 | memset(info, 0, sizeof(*info)); | 910 | memset(info, 0, sizeof(*info)); |
911 | link = &info->link; | 911 | info->p_dev = p_dev; |
912 | link->priv = info; | 912 | link->priv = info; |
913 | link->io.NumPorts1 = 16; | 913 | link->io.NumPorts1 = 16; |
914 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 914 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
@@ -919,9 +919,6 @@ SYM53C500_attach(struct pcmcia_device *p_dev) | |||
919 | link->conf.IntType = INT_MEMORY_AND_IO; | 919 | link->conf.IntType = INT_MEMORY_AND_IO; |
920 | link->conf.Present = PRESENT_OPTION; | 920 | link->conf.Present = PRESENT_OPTION; |
921 | 921 | ||
922 | link->handle = p_dev; | ||
923 | p_dev->instance = link; | ||
924 | |||
925 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 922 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
926 | SYM53C500_config(link); | 923 | SYM53C500_config(link); |
927 | 924 | ||