aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/atiixp.c2
-rw-r--r--drivers/ide/ide-acpi.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
index 6396c3ad3252..837322b10a4c 100644
--- a/drivers/ide/atiixp.c
+++ b/drivers/ide/atiixp.c
@@ -177,7 +177,7 @@ static const struct pci_device_id atiixp_pci_tbl[] = {
177 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 }, 177 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 },
178 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 }, 178 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 },
179 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 }, 179 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 },
180 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_SB900_IDE), 0 }, 180 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_HUDSON2_IDE), 0 },
181 { 0, }, 181 { 0, },
182}; 182};
183MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); 183MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index c509c9916464..c0cf45a11b93 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -114,8 +114,6 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
114 unsigned int bus, devnum, func; 114 unsigned int bus, devnum, func;
115 acpi_integer addr; 115 acpi_integer addr;
116 acpi_handle dev_handle; 116 acpi_handle dev_handle;
117 struct acpi_buffer buffer = {.length = ACPI_ALLOCATE_BUFFER,
118 .pointer = NULL};
119 acpi_status status; 117 acpi_status status;
120 struct acpi_device_info *dinfo = NULL; 118 struct acpi_device_info *dinfo = NULL;
121 int ret = -ENODEV; 119 int ret = -ENODEV;
@@ -134,12 +132,11 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
134 goto err; 132 goto err;
135 } 133 }
136 134
137 status = acpi_get_object_info(dev_handle, &buffer); 135 status = acpi_get_object_info(dev_handle, &dinfo);
138 if (ACPI_FAILURE(status)) { 136 if (ACPI_FAILURE(status)) {
139 DEBPRINT("get_object_info for device failed\n"); 137 DEBPRINT("get_object_info for device failed\n");
140 goto err; 138 goto err;
141 } 139 }
142 dinfo = buffer.pointer;
143 if (dinfo && (dinfo->valid & ACPI_VALID_ADR) && 140 if (dinfo && (dinfo->valid & ACPI_VALID_ADR) &&
144 dinfo->address == addr) { 141 dinfo->address == addr) {
145 *pcidevfn = addr; 142 *pcidevfn = addr;