diff options
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 31218e1d2a18..9271e5209ac1 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -78,7 +78,7 @@ static struct kobj_type ktype_acpi_ns = { | |||
78 | .release = acpi_device_release, | 78 | .release = acpi_device_release, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static int namespace_hotplug(struct kset *kset, struct kobject *kobj, | 81 | static int namespace_uevent(struct kset *kset, struct kobject *kobj, |
82 | char **envp, int num_envp, char *buffer, | 82 | char **envp, int num_envp, char *buffer, |
83 | int buffer_size) | 83 | int buffer_size) |
84 | { | 84 | { |
@@ -89,8 +89,8 @@ static int namespace_hotplug(struct kset *kset, struct kobject *kobj, | |||
89 | if (!dev->driver) | 89 | if (!dev->driver) |
90 | return 0; | 90 | return 0; |
91 | 91 | ||
92 | if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, | 92 | if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len, |
93 | "PHYSDEVDRIVER=%s", dev->driver->name)) | 93 | "PHYSDEVDRIVER=%s", dev->driver->name)) |
94 | return -ENOMEM; | 94 | return -ENOMEM; |
95 | 95 | ||
96 | envp[i] = NULL; | 96 | envp[i] = NULL; |
@@ -98,8 +98,8 @@ static int namespace_hotplug(struct kset *kset, struct kobject *kobj, | |||
98 | return 0; | 98 | return 0; |
99 | } | 99 | } |
100 | 100 | ||
101 | static struct kset_hotplug_ops namespace_hotplug_ops = { | 101 | static struct kset_uevent_ops namespace_uevent_ops = { |
102 | .hotplug = &namespace_hotplug, | 102 | .uevent = &namespace_uevent, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static struct kset acpi_namespace_kset = { | 105 | static struct kset acpi_namespace_kset = { |
@@ -108,7 +108,7 @@ static struct kset acpi_namespace_kset = { | |||
108 | }, | 108 | }, |
109 | .subsys = &acpi_subsys, | 109 | .subsys = &acpi_subsys, |
110 | .ktype = &ktype_acpi_ns, | 110 | .ktype = &ktype_acpi_ns, |
111 | .hotplug_ops = &namespace_hotplug_ops, | 111 | .uevent_ops = &namespace_uevent_ops, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static void acpi_device_register(struct acpi_device *device, | 114 | static void acpi_device_register(struct acpi_device *device, |
@@ -347,7 +347,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
347 | } | 347 | } |
348 | 348 | ||
349 | /* -------------------------------------------------------------------------- | 349 | /* -------------------------------------------------------------------------- |
350 | ACPI hotplug sysfs device file support | 350 | ACPI sysfs device file support |
351 | -------------------------------------------------------------------------- */ | 351 | -------------------------------------------------------------------------- */ |
352 | static ssize_t acpi_eject_store(struct acpi_device *device, | 352 | static ssize_t acpi_eject_store(struct acpi_device *device, |
353 | const char *buf, size_t count); | 353 | const char *buf, size_t count); |
@@ -475,8 +475,10 @@ static LIST_HEAD(acpi_bus_drivers); | |||
475 | static DECLARE_MUTEX(acpi_bus_drivers_lock); | 475 | static DECLARE_MUTEX(acpi_bus_drivers_lock); |
476 | 476 | ||
477 | /** | 477 | /** |
478 | * acpi_bus_match | 478 | * acpi_bus_match - match device IDs to driver's supported IDs |
479 | * -------------- | 479 | * @device: the device that we are trying to match to a driver |
480 | * @driver: driver whose device id table is being checked | ||
481 | * | ||
480 | * Checks the device's hardware (_HID) or compatible (_CID) ids to see if it | 482 | * Checks the device's hardware (_HID) or compatible (_CID) ids to see if it |
481 | * matches the specified driver's criteria. | 483 | * matches the specified driver's criteria. |
482 | */ | 484 | */ |
@@ -489,8 +491,10 @@ acpi_bus_match(struct acpi_device *device, struct acpi_driver *driver) | |||
489 | } | 491 | } |
490 | 492 | ||
491 | /** | 493 | /** |
492 | * acpi_bus_driver_init | 494 | * acpi_bus_driver_init - add a device to a driver |
493 | * -------------------- | 495 | * @device: the device to add and initialize |
496 | * @driver: driver for the device | ||
497 | * | ||
494 | * Used to initialize a device via its device driver. Called whenever a | 498 | * Used to initialize a device via its device driver. Called whenever a |
495 | * driver is bound to a device. Invokes the driver's add() and start() ops. | 499 | * driver is bound to a device. Invokes the driver's add() and start() ops. |
496 | */ | 500 | */ |
@@ -603,8 +607,9 @@ static int acpi_driver_detach(struct acpi_driver *drv) | |||
603 | } | 607 | } |
604 | 608 | ||
605 | /** | 609 | /** |
606 | * acpi_bus_register_driver | 610 | * acpi_bus_register_driver - register a driver with the ACPI bus |
607 | * ------------------------ | 611 | * @driver: driver being registered |
612 | * | ||
608 | * Registers a driver with the ACPI bus. Searches the namespace for all | 613 | * Registers a driver with the ACPI bus. Searches the namespace for all |
609 | * devices that match the driver's criteria and binds. Returns the | 614 | * devices that match the driver's criteria and binds. Returns the |
610 | * number of devices that were claimed by the driver, or a negative | 615 | * number of devices that were claimed by the driver, or a negative |
@@ -633,8 +638,9 @@ int acpi_bus_register_driver(struct acpi_driver *driver) | |||
633 | EXPORT_SYMBOL(acpi_bus_register_driver); | 638 | EXPORT_SYMBOL(acpi_bus_register_driver); |
634 | 639 | ||
635 | /** | 640 | /** |
636 | * acpi_bus_unregister_driver | 641 | * acpi_bus_unregister_driver - unregisters a driver with the APIC bus |
637 | * -------------------------- | 642 | * @driver: driver to unregister |
643 | * | ||
638 | * Unregisters a driver with the ACPI bus. Searches the namespace for all | 644 | * Unregisters a driver with the ACPI bus. Searches the namespace for all |
639 | * devices that match the driver's criteria and unbinds. | 645 | * devices that match the driver's criteria and unbinds. |
640 | */ | 646 | */ |
@@ -660,8 +666,9 @@ int acpi_bus_unregister_driver(struct acpi_driver *driver) | |||
660 | EXPORT_SYMBOL(acpi_bus_unregister_driver); | 666 | EXPORT_SYMBOL(acpi_bus_unregister_driver); |
661 | 667 | ||
662 | /** | 668 | /** |
663 | * acpi_bus_find_driver | 669 | * acpi_bus_find_driver - check if there is a driver installed for the device |
664 | * -------------------- | 670 | * @device: device that we are trying to find a supporting driver for |
671 | * | ||
665 | * Parses the list of registered drivers looking for a driver applicable for | 672 | * Parses the list of registered drivers looking for a driver applicable for |
666 | * the specified device. | 673 | * the specified device. |
667 | */ | 674 | */ |
@@ -844,7 +851,7 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
844 | * ---- | 851 | * ---- |
845 | * Fix for the system root bus device -- the only root-level device. | 852 | * Fix for the system root bus device -- the only root-level device. |
846 | */ | 853 | */ |
847 | if ((parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) { | 854 | if (((acpi_handle)parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) { |
848 | hid = ACPI_BUS_HID; | 855 | hid = ACPI_BUS_HID; |
849 | strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); | 856 | strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); |
850 | strcpy(device->pnp.device_class, ACPI_BUS_CLASS); | 857 | strcpy(device->pnp.device_class, ACPI_BUS_CLASS); |