summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_driver.c
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2013-12-06 15:36:26 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-12-07 01:41:01 +0100
commitd0a7edbb6608d05b0718a0949be914067b5980fb (patch)
tree554e9ba2c4dd6ab1150d9cd266ae97749e3f1d25 /drivers/acpi/processor_driver.c
parent6dd7aca824df3bd2f9c684b9dc68ee00afb065e8 (diff)
downloadblackbird-op-linux-d0a7edbb6608d05b0718a0949be914067b5980fb.tar.gz
blackbird-op-linux-d0a7edbb6608d05b0718a0949be914067b5980fb.zip
ACPI / processor: use ACPI_COMPANION() to get ACPI device
Use ACPI_COMPANION() to get an ACPI device instead of acpi_bus_get_device() in the processor driver. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> [rjw: Changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/processor_driver.c')
-rw-r--r--drivers/acpi/processor_driver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 146ab7e2b81d..c1c35623550f 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -224,9 +224,9 @@ static int __acpi_processor_start(struct acpi_device *device)
static int acpi_processor_start(struct device *dev)
{
- struct acpi_device *device;
+ struct acpi_device *device = ACPI_COMPANION(dev);
- if (acpi_bus_get_device(ACPI_HANDLE(dev), &device))
+ if (!device)
return -ENODEV;
return __acpi_processor_start(device);
@@ -234,10 +234,10 @@ static int acpi_processor_start(struct device *dev)
static int acpi_processor_stop(struct device *dev)
{
- struct acpi_device *device;
+ struct acpi_device *device = ACPI_COMPANION(dev);
struct acpi_processor *pr;
- if (acpi_bus_get_device(ACPI_HANDLE(dev), &device))
+ if (!device)
return 0;
acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
OpenPOWER on IntegriCloud