From: Michal Wilczynski <michal.wilczynski@intel.com>
To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: rafael.j.wysocki@intel.com, andriy.shevchenko@linux.intel.com,
lenb@kernel.org, Michal Wilczynski <michal.wilczynski@intel.com>
Subject: [PATCH v1 3/3] ACPI: acpi_pad: Rename ACPI device from device to adev
Date: Mon, 16 Oct 2023 20:01:25 +0300 [thread overview]
Message-ID: <20231016170125.576159-4-michal.wilczynski@intel.com> (raw)
In-Reply-To: <20231016170125.576159-1-michal.wilczynski@intel.com>
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 <michal.wilczynski@intel.com>
---
drivers/acpi/acpi_pad.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index 2513028a0299..87cf2234ecd2 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -398,12 +398,12 @@ static void acpi_pad_handle_notify(acpi_handle handle)
static void acpi_pad_notify(acpi_handle handle, u32 event, void *data)
{
struct device *dev = data;
- struct acpi_device *device = ACPI_COMPANION(dev);
+ struct acpi_device *adev = ACPI_COMPANION(dev);
switch (event) {
case ACPI_PROCESSOR_AGGREGATOR_NOTIFY:
acpi_pad_handle_notify(handle);
- acpi_bus_generate_netlink_event(device->pnp.device_class,
+ acpi_bus_generate_netlink_event(adev->pnp.device_class,
dev_name(dev), event, 0);
break;
default:
@@ -414,14 +414,14 @@ static void acpi_pad_notify(acpi_handle handle, u32 event, void *data)
static int acpi_pad_probe(struct platform_device *pdev)
{
- struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
+ struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
struct device *dev = &pdev->dev;
acpi_status status;
- strcpy(acpi_device_name(device), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
- strcpy(acpi_device_class(device), ACPI_PROCESSOR_AGGREGATOR_CLASS);
+ strcpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
+ strcpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS);
- status = acpi_install_notify_handler(device->handle,
+ status = acpi_install_notify_handler(adev->handle,
ACPI_DEVICE_NOTIFY,
acpi_pad_notify,
dev);
@@ -433,13 +433,13 @@ static int acpi_pad_probe(struct platform_device *pdev)
static void acpi_pad_remove(struct platform_device *pdev)
{
- struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
+ struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
mutex_lock(&isolated_cpus_lock);
acpi_pad_idle_cpus(0);
mutex_unlock(&isolated_cpus_lock);
- acpi_remove_notify_handler(device->handle,
+ acpi_remove_notify_handler(adev->handle,
ACPI_DEVICE_NOTIFY,
acpi_pad_notify);
}
--
2.41.0
prev parent reply other threads:[~2023-10-16 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 17:01 [PATCH v1 0/3] Replace acpi_driver with platform_driver Michal Wilczynski
2023-10-16 17:01 ` [PATCH v1 1/3] ACPI: acpi_pad: " Michal Wilczynski
2023-10-18 10:47 ` Rafael J. Wysocki
2023-10-16 17:01 ` [PATCH v1 2/3] ACPI: acpi_pad: Use dev groups for sysfs Michal Wilczynski
2023-10-16 17:01 ` Michal Wilczynski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231016170125.576159-4-michal.wilczynski@intel.com \
--to=michal.wilczynski@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®