diff options
Diffstat (limited to 'drivers/acpi/scan.c')
| -rw-r--r-- | drivers/acpi/scan.c | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index a9dda8e0f9f9..39b7233c3485 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; |
| @@ -751,16 +751,6 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
| 751 | if (!acpi_match_device_ids(device, button_device_ids)) | 751 | if (!acpi_match_device_ids(device, button_device_ids)) |
| 752 | device->wakeup.flags.run_wake = 1; | 752 | device->wakeup.flags.run_wake = 1; |
| 753 | 753 | ||
| 754 | /* | ||
| 755 | * Don't set Power button GPE as run_wake | ||
| 756 | * if Fixed Power button is used | ||
| 757 | */ | ||
| 758 | if (!strcmp(device->pnp.hardware_id, "PNP0C0C") && | ||
| 759 | !(acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON)) { | ||
| 760 | device->wakeup.flags.run_wake = 0; | ||
| 761 | device->wakeup.flags.valid = 0; | ||
| 762 | } | ||
| 763 | |||
| 764 | end: | 754 | end: |
| 765 | if (ACPI_FAILURE(status)) | 755 | if (ACPI_FAILURE(status)) |
| 766 | device->flags.wake_capable = 0; | 756 | device->flags.wake_capable = 0; |
| @@ -919,36 +909,6 @@ static void acpi_device_get_busid(struct acpi_device *device, | |||
| 919 | } | 909 | } |
| 920 | } | 910 | } |
| 921 | 911 | ||
| 922 | static int | ||
| 923 | acpi_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 | /* | 912 | /* |
| 953 | * acpi_bay_match - see if a device is an ejectable driver bay | 913 | * acpi_bay_match - see if a device is an ejectable driver bay |
| 954 | * | 914 | * |
| @@ -1031,7 +991,7 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
| 1031 | will get autoloaded and the device might still match | 991 | will get autoloaded and the device might still match |
| 1032 | against another driver. | 992 | against another driver. |
| 1033 | */ | 993 | */ |
| 1034 | if (ACPI_SUCCESS(acpi_video_bus_match(device))) | 994 | if (acpi_is_video_device(device)) |
| 1035 | cid_add = ACPI_VIDEO_HID; | 995 | cid_add = ACPI_VIDEO_HID; |
| 1036 | else if (ACPI_SUCCESS(acpi_bay_match(device))) | 996 | else if (ACPI_SUCCESS(acpi_bay_match(device))) |
| 1037 | cid_add = ACPI_BAY_HID; | 997 | cid_add = ACPI_BAY_HID; |
| @@ -1043,7 +1003,7 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
| 1043 | hid = ACPI_POWER_HID; | 1003 | hid = ACPI_POWER_HID; |
| 1044 | break; | 1004 | break; |
| 1045 | case ACPI_BUS_TYPE_PROCESSOR: | 1005 | case ACPI_BUS_TYPE_PROCESSOR: |
| 1046 | hid = ACPI_PROCESSOR_HID; | 1006 | hid = ACPI_PROCESSOR_OBJECT_HID; |
| 1047 | break; | 1007 | break; |
| 1048 | case ACPI_BUS_TYPE_SYSTEM: | 1008 | case ACPI_BUS_TYPE_SYSTEM: |
| 1049 | hid = ACPI_SYSTEM_HID; | 1009 | hid = ACPI_SYSTEM_HID; |
