aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index a9dda8e0f9f9..bd5253ee5c85 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -109,8 +109,7 @@ static int acpi_bus_hot_remove_device(void *context)
109 return 0; 109 return 0;
110 110
111 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 111 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
112 "Hot-removing device %s...\n", device->dev.bus_id)); 112 "Hot-removing device %s...\n", dev_name(&device->dev)));
113
114 113
115 if (acpi_bus_trim(device, 1)) { 114 if (acpi_bus_trim(device, 1)) {
116 printk(KERN_ERR PREFIX 115 printk(KERN_ERR PREFIX
@@ -460,7 +459,7 @@ static int acpi_device_register(struct acpi_device *device,
460 acpi_device_bus_id->instance_no = 0; 459 acpi_device_bus_id->instance_no = 0;
461 list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list); 460 list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
462 } 461 }
463 sprintf(device->dev.bus_id, "%s:%02x", acpi_device_bus_id->bus_id, acpi_device_bus_id->instance_no); 462 dev_set_name(&device->dev, "%s:%02x", acpi_device_bus_id->bus_id, acpi_device_bus_id->instance_no);
464 463
465 if (device->parent) { 464 if (device->parent) {
466 list_add_tail(&device->node, &device->parent->children); 465 list_add_tail(&device->node, &device->parent->children);
@@ -484,7 +483,8 @@ static int acpi_device_register(struct acpi_device *device,
484 483
485 result = acpi_device_setup_files(device); 484 result = acpi_device_setup_files(device);
486 if(result) 485 if(result)
487 printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n", device->dev.bus_id); 486 printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n",
487 dev_name(&device->dev));
488 488
489 device->removal_type = ACPI_BUS_REMOVAL_NORMAL; 489 device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
490 return 0; 490 return 0;
@@ -919,36 +919,6 @@ static void acpi_device_get_busid(struct acpi_device *device,
919 } 919 }
920} 920}
921 921
922static int
923acpi_video_bus_match(struct acpi_device *device)
924{
925 acpi_handle h_dummy;
926
927 if (!device)
928 return -EINVAL;
929
930 /* Since there is no HID, CID for ACPI Video drivers, we have
931 * to check well known required nodes for each feature we support.
932 */
933
934 /* Does this device able to support video switching ? */
935 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) &&
936 ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
937 return 0;
938
939 /* Does this device able to retrieve a video ROM ? */
940 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy)))
941 return 0;
942
943 /* Does this device able to configure which video head to be POSTed ? */
944 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy)) &&
945 ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy)) &&
946 ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy)))
947 return 0;
948
949 return -ENODEV;
950}
951
952/* 922/*
953 * acpi_bay_match - see if a device is an ejectable driver bay 923 * acpi_bay_match - see if a device is an ejectable driver bay
954 * 924 *
@@ -1031,7 +1001,7 @@ static void acpi_device_set_id(struct acpi_device *device,
1031 will get autoloaded and the device might still match 1001 will get autoloaded and the device might still match
1032 against another driver. 1002 against another driver.
1033 */ 1003 */
1034 if (ACPI_SUCCESS(acpi_video_bus_match(device))) 1004 if (acpi_is_video_device(device))
1035 cid_add = ACPI_VIDEO_HID; 1005 cid_add = ACPI_VIDEO_HID;
1036 else if (ACPI_SUCCESS(acpi_bay_match(device))) 1006 else if (ACPI_SUCCESS(acpi_bay_match(device)))
1037 cid_add = ACPI_BAY_HID; 1007 cid_add = ACPI_BAY_HID;
@@ -1043,7 +1013,7 @@ static void acpi_device_set_id(struct acpi_device *device,
1043 hid = ACPI_POWER_HID; 1013 hid = ACPI_POWER_HID;
1044 break; 1014 break;
1045 case ACPI_BUS_TYPE_PROCESSOR: 1015 case ACPI_BUS_TYPE_PROCESSOR:
1046 hid = ACPI_PROCESSOR_HID; 1016 hid = ACPI_PROCESSOR_OBJECT_HID;
1047 break; 1017 break;
1048 case ACPI_BUS_TYPE_SYSTEM: 1018 case ACPI_BUS_TYPE_SYSTEM:
1049 hid = ACPI_SYSTEM_HID; 1019 hid = ACPI_SYSTEM_HID;