aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-bmdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-bmdma.c')
-rw-r--r--drivers/scsi/libata-bmdma.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c
index 4bc05371737c..13fab97c840e 100644
--- a/drivers/scsi/libata-bmdma.c
+++ b/drivers/scsi/libata-bmdma.c
@@ -1076,10 +1076,21 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
1076 1076
1077 /* FIXME: check ata_device_add return */ 1077 /* FIXME: check ata_device_add return */
1078 if (legacy_mode) { 1078 if (legacy_mode) {
1079 if (legacy_mode & (1 << 0)) 1079 struct device *dev = &pdev->dev;
1080 struct ata_host_set *host_set = NULL;
1081
1082 if (legacy_mode & (1 << 0)) {
1080 ata_device_add(probe_ent); 1083 ata_device_add(probe_ent);
1081 if (legacy_mode & (1 << 1)) 1084 host_set = dev_get_drvdata(dev);
1085 }
1086
1087 if (legacy_mode & (1 << 1)) {
1082 ata_device_add(probe_ent2); 1088 ata_device_add(probe_ent2);
1089 if (host_set) {
1090 host_set->next = dev_get_drvdata(dev);
1091 dev_set_drvdata(dev, host_set);
1092 }
1093 }
1083 } else 1094 } else
1084 ata_device_add(probe_ent); 1095 ata_device_add(probe_ent);
1085 1096