diff options
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 769e54bc9226..30a39baeac51 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -837,20 +837,6 @@ acpi_video_bus_match(struct acpi_device *device) | |||
837 | return -ENODEV; | 837 | return -ENODEV; |
838 | } | 838 | } |
839 | 839 | ||
840 | static int acpi_pci_bridge_match(struct acpi_device *device) | ||
841 | { | ||
842 | acpi_status status; | ||
843 | acpi_handle handle; | ||
844 | |||
845 | /* pci bridge has _PRT but isn't PNP0A03 */ | ||
846 | status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle); | ||
847 | if (ACPI_FAILURE(status)) | ||
848 | return -ENODEV; | ||
849 | if (!acpi_match_ids(device, "PNP0A03")) | ||
850 | return -ENODEV; | ||
851 | return 0; | ||
852 | } | ||
853 | |||
854 | static void acpi_device_set_id(struct acpi_device *device, | 840 | static void acpi_device_set_id(struct acpi_device *device, |
855 | struct acpi_device *parent, acpi_handle handle, | 841 | struct acpi_device *parent, acpi_handle handle, |
856 | int type) | 842 | int type) |
@@ -886,10 +872,6 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
886 | status = acpi_video_bus_match(device); | 872 | status = acpi_video_bus_match(device); |
887 | if(ACPI_SUCCESS(status)) | 873 | if(ACPI_SUCCESS(status)) |
888 | hid = ACPI_VIDEO_HID; | 874 | hid = ACPI_VIDEO_HID; |
889 | |||
890 | status = acpi_pci_bridge_match(device); | ||
891 | if(ACPI_SUCCESS(status)) | ||
892 | hid = ACPI_PCI_BRIDGE_HID; | ||
893 | } | 875 | } |
894 | break; | 876 | break; |
895 | case ACPI_BUS_TYPE_POWER: | 877 | case ACPI_BUS_TYPE_POWER: |
@@ -1021,6 +1003,13 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) | |||
1021 | if (!rmdevice) | 1003 | if (!rmdevice) |
1022 | return 0; | 1004 | return 0; |
1023 | 1005 | ||
1006 | /* | ||
1007 | * unbind _ADR-Based Devices when hot removal | ||
1008 | */ | ||
1009 | if (dev->flags.bus_address) { | ||
1010 | if ((dev->parent) && (dev->parent->ops.unbind)) | ||
1011 | dev->parent->ops.unbind(dev); | ||
1012 | } | ||
1024 | acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); | 1013 | acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); |
1025 | 1014 | ||
1026 | return 0; | 1015 | return 0; |
@@ -1137,6 +1126,14 @@ acpi_add_single_object(struct acpi_device **child, | |||
1137 | 1126 | ||
1138 | result = acpi_device_register(device, parent); | 1127 | result = acpi_device_register(device, parent); |
1139 | 1128 | ||
1129 | /* | ||
1130 | * Bind _ADR-Based Devices when hot add | ||
1131 | */ | ||
1132 | if (device->flags.bus_address) { | ||
1133 | if (device->parent && device->parent->ops.bind) | ||
1134 | device->parent->ops.bind(device); | ||
1135 | } | ||
1136 | |||
1140 | end: | 1137 | end: |
1141 | if (!result) | 1138 | if (!result) |
1142 | *child = device; | 1139 | *child = device; |