diff options
author | Patrick Mochel <mochel@linux.intel.com> | 2006-12-07 07:56:38 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-15 23:38:34 -0500 |
commit | f883d9db008deb20d4969c26475100cec2b7f6f8 (patch) | |
tree | 4d66f2bf9f0a6142685870177e26837fc510f9e1 /drivers/acpi/processor_core.c | |
parent | a7178df5e7e5730e5daa6cf6d8b8bf73adbe75c0 (diff) |
ACPI: convert to sysfs framework
Setup new sysfs framework
1. Remove /sys/firmware/acpi
2. Add ACPI device in device tree.
File "eject" for every device that has _EJ0 method is moved from
/sys/firmware to /sys/devices.
Operation on this file is exactly the same as before.
i.e. echo 1 to "eject" will cause hot removal of this device.
Corresponding changes should be made in userspace for hot removal.
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Zhang Rui<rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_core.c')
-rw-r--r-- | drivers/acpi/processor_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 1908e0d2022..46e72c38871 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -711,7 +711,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) | |||
711 | return -ENODEV; | 711 | return -ENODEV; |
712 | 712 | ||
713 | if ((pr->id >= 0) && (pr->id < NR_CPUS)) { | 713 | if ((pr->id >= 0) && (pr->id < NR_CPUS)) { |
714 | kobject_uevent(&(*device)->kobj, KOBJ_ONLINE); | 714 | kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE); |
715 | } | 715 | } |
716 | return 0; | 716 | return 0; |
717 | } | 717 | } |
@@ -749,13 +749,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
749 | } | 749 | } |
750 | 750 | ||
751 | if (pr->id >= 0 && (pr->id < NR_CPUS)) { | 751 | if (pr->id >= 0 && (pr->id < NR_CPUS)) { |
752 | kobject_uevent(&device->kobj, KOBJ_OFFLINE); | 752 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); |
753 | break; | 753 | break; |
754 | } | 754 | } |
755 | 755 | ||
756 | result = acpi_processor_start(device); | 756 | result = acpi_processor_start(device); |
757 | if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { | 757 | if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { |
758 | kobject_uevent(&device->kobj, KOBJ_ONLINE); | 758 | kobject_uevent(&device->dev.kobj, KOBJ_ONLINE); |
759 | } else { | 759 | } else { |
760 | printk(KERN_ERR PREFIX "Device [%s] failed to start\n", | 760 | printk(KERN_ERR PREFIX "Device [%s] failed to start\n", |
761 | acpi_device_bid(device)); | 761 | acpi_device_bid(device)); |
@@ -778,7 +778,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
778 | } | 778 | } |
779 | 779 | ||
780 | if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) | 780 | if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) |
781 | kobject_uevent(&device->kobj, KOBJ_OFFLINE); | 781 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); |
782 | break; | 782 | break; |
783 | default: | 783 | default: |
784 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 784 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |