Skip to content

Commit 5ccd40c

Browse files
mwilczyrafaeljw
authored andcommitted
ACPI: acpi_pad: Rename ACPI device from device to adev
Since transformation from ACPI driver to platform driver there are two devices on which the driver operates - ACPI device and platform device. For the sake of reader this calls for the distinction in their naming, to avoid confusion. Rename device to adev, as corresponding platform device is called pdev. Signed-off-by: Michal Wilczynski <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d7228c7 commit 5ccd40c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

drivers/acpi/acpi_pad.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,13 @@ static void acpi_pad_handle_notify(acpi_handle handle)
398398
static void acpi_pad_notify(acpi_handle handle, u32 event,
399399
void *data)
400400
{
401-
struct acpi_device *device = data;
401+
struct acpi_device *adev = data;
402402

403403
switch (event) {
404404
case ACPI_PROCESSOR_AGGREGATOR_NOTIFY:
405405
acpi_pad_handle_notify(handle);
406-
acpi_bus_generate_netlink_event(device->pnp.device_class,
407-
dev_name(&device->dev), event, 0);
406+
acpi_bus_generate_netlink_event(adev->pnp.device_class,
407+
dev_name(&adev->dev), event, 0);
408408
break;
409409
default:
410410
pr_warn("Unsupported event [0x%x]\n", event);
@@ -414,14 +414,15 @@ static void acpi_pad_notify(acpi_handle handle, u32 event,
414414

415415
static int acpi_pad_probe(struct platform_device *pdev)
416416
{
417-
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
417+
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
418418
acpi_status status;
419419

420-
strcpy(acpi_device_name(device), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
421-
strcpy(acpi_device_class(device), ACPI_PROCESSOR_AGGREGATOR_CLASS);
420+
strcpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
421+
strcpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS);
422+
423+
status = acpi_install_notify_handler(adev->handle,
424+
ACPI_DEVICE_NOTIFY, acpi_pad_notify, adev);
422425

423-
status = acpi_install_notify_handler(device->handle,
424-
ACPI_DEVICE_NOTIFY, acpi_pad_notify, device);
425426
if (ACPI_FAILURE(status))
426427
return -ENODEV;
427428

@@ -430,13 +431,13 @@ static int acpi_pad_probe(struct platform_device *pdev)
430431

431432
static void acpi_pad_remove(struct platform_device *pdev)
432433
{
433-
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
434+
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
434435

435436
mutex_lock(&isolated_cpus_lock);
436437
acpi_pad_idle_cpus(0);
437438
mutex_unlock(&isolated_cpus_lock);
438439

439-
acpi_remove_notify_handler(device->handle,
440+
acpi_remove_notify_handler(adev->handle,
440441
ACPI_DEVICE_NOTIFY, acpi_pad_notify);
441442
}
442443

0 commit comments

Comments
 (0)