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>
This commit is contained in:
parent
6dd7aca824
commit
d0a7edbb66
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue