From: "Rafael J. Wysocki" <rafael@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Hans de Goede <hansg@kernel.org>,
platform-driver-x86@vger.kernel.org,
Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Subject: [PATCH v1 04/10] platform/x86: classmate-laptop: Rename two helper functions
Date: Thu, 07 May 2026 22:04:28 +0200 [thread overview]
Message-ID: <23097445.EfDdHjke4D@rafael.j.wysocki> (raw)
In-Reply-To: <1956046.tdWV9SEqCh@rafael.j.wysocki>
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Since cmpc_add_acpi_notify_device() and cmpc_remove_acpi_notify_device()
have been modified to take a plain struct device pointer as the first
argument, then have nothing to do with ACPI in principle, so rename
them to cmpc_add_notify_device() and cmpc_remove_notify_device(),
respectively, and consolidate white space around the call sites of
the former.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/platform/x86/classmate-laptop.c | 30 +++++++++++--------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
index 7784712bfabd..bb575ae2bc89 100644
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -38,8 +38,8 @@ struct cmpc_accel {
typedef void (*input_device_init)(struct input_dev *dev);
-static int cmpc_add_acpi_notify_device(struct device *dev, char *name,
- input_device_init idev_init)
+static int cmpc_add_notify_device(struct device *dev, char *name,
+ input_device_init idev_init)
{
struct input_dev *inputdev;
int error;
@@ -59,7 +59,7 @@ static int cmpc_add_acpi_notify_device(struct device *dev, char *name,
return 0;
}
-static void cmpc_remove_acpi_notify_device(struct device *dev)
+static void cmpc_remove_notify_device(struct device *dev)
{
input_unregister_device(dev_get_drvdata(dev));
}
@@ -404,8 +404,7 @@ static int cmpc_accel_add_v4(struct acpi_device *acpi)
accel->inputdev_state = CMPC_ACCEL_DEV_STATE_CLOSED;
- error = cmpc_add_acpi_notify_device(&acpi->dev, "cmpc_accel_v4",
- cmpc_accel_idev_init_v4);
+ error = cmpc_add_notify_device(&acpi->dev, "cmpc_accel_v4", cmpc_accel_idev_init_v4);
if (error)
goto failed_input;
@@ -432,7 +431,7 @@ static int cmpc_accel_add_v4(struct acpi_device *acpi)
failed_g_select:
device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr_v4);
failed_sensitivity:
- cmpc_remove_acpi_notify_device(&acpi->dev);
+ cmpc_remove_notify_device(&acpi->dev);
failed_input:
kfree(accel);
return error;
@@ -445,7 +444,7 @@ static void cmpc_accel_remove_v4(struct acpi_device *acpi)
device_remove_file(&acpi->dev, &cmpc_accel_g_select_attr_v4);
device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr_v4);
- cmpc_remove_acpi_notify_device(&acpi->dev);
+ cmpc_remove_notify_device(&acpi->dev);
kfree(accel);
}
@@ -657,8 +656,7 @@ static int cmpc_accel_add(struct acpi_device *acpi)
if (!accel)
return -ENOMEM;
- error = cmpc_add_acpi_notify_device(&acpi->dev, "cmpc_accel",
- cmpc_accel_idev_init);
+ error = cmpc_add_notify_device(&acpi->dev, "cmpc_accel", cmpc_accel_idev_init);
if (error)
goto failed_input;
@@ -676,7 +674,7 @@ static int cmpc_accel_add(struct acpi_device *acpi)
return 0;
failed_file:
- cmpc_remove_acpi_notify_device(&acpi->dev);
+ cmpc_remove_notify_device(&acpi->dev);
failed_input:
kfree(accel);
return error;
@@ -688,7 +686,7 @@ static void cmpc_accel_remove(struct acpi_device *acpi)
struct cmpc_accel *accel = dev_get_drvdata(&inputdev->dev);
device_remove_file(&acpi->dev, &cmpc_accel_sensitivity_attr);
- cmpc_remove_acpi_notify_device(&acpi->dev);
+ cmpc_remove_notify_device(&acpi->dev);
kfree(accel);
}
@@ -760,13 +758,12 @@ static void cmpc_tablet_idev_init(struct input_dev *inputdev)
static int cmpc_tablet_add(struct acpi_device *acpi)
{
- return cmpc_add_acpi_notify_device(&acpi->dev, "cmpc_tablet",
- cmpc_tablet_idev_init);
+ return cmpc_add_notify_device(&acpi->dev, "cmpc_tablet", cmpc_tablet_idev_init);
}
static void cmpc_tablet_remove(struct acpi_device *acpi)
{
- cmpc_remove_acpi_notify_device(&acpi->dev);
+ cmpc_remove_notify_device(&acpi->dev);
}
#ifdef CONFIG_PM_SLEEP
@@ -1084,13 +1081,12 @@ static void cmpc_keys_idev_init(struct input_dev *inputdev)
static int cmpc_keys_add(struct acpi_device *acpi)
{
- return cmpc_add_acpi_notify_device(&acpi->dev, "cmpc_keys",
- cmpc_keys_idev_init);
+ return cmpc_add_notify_device(&acpi->dev, "cmpc_keys", cmpc_keys_idev_init);
}
static void cmpc_keys_remove(struct acpi_device *acpi)
{
- cmpc_remove_acpi_notify_device(&acpi->dev);
+ cmpc_remove_notify_device(&acpi->dev);
}
static const struct acpi_device_id cmpc_keys_device_ids[] = {
next prev parent reply other threads:[~2026-05-07 20:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 19:58 [PATCH v1 00/10] platform/x86: classmate-laptop: Bind to platform devices instead of ACPI ones Rafael J. Wysocki
2026-05-07 20:00 ` [PATCH v1 01/10] platform/x86: classmate-laptop: Address memory leaks on driver removal Rafael J. Wysocki
2026-05-07 20:01 ` [PATCH v1 02/10] platform/x86: classmate-laptop: Unify probe rollback and remove code Rafael J. Wysocki
2026-05-07 20:03 ` [PATCH v1 03/10] platform/x86: classmate-laptop: Pass struct device pointer to helpers Rafael J. Wysocki
2026-05-07 20:04 ` Rafael J. Wysocki [this message]
2026-05-07 20:07 ` [PATCH v1 05/10] platform/x86: classmate-laptop: Register ACPI notify handlers directly Rafael J. Wysocki
2026-05-07 20:10 ` [PATCH v1 06/10] platform/x86: classmate-laptop: Convert v4 accel driver to a platform one Rafael J. Wysocki
2026-05-07 20:10 ` [PATCH v1 07/10] platform/x86: classmate-laptop: Convert " Rafael J. Wysocki
2026-05-07 20:11 ` [PATCH v1 08/10] platform/x86: classmate-laptop: Convert tablet " Rafael J. Wysocki
2026-05-07 20:12 ` [PATCH v1 09/10] platform/x86: classmate-laptop: Convert ipml " Rafael J. Wysocki
2026-05-07 20:14 ` [PATCH v1 10/10] platform/x86: classmate-laptop: Convert keys " Rafael J. Wysocki
2026-05-08 12:05 ` [PATCH v1 00/10] platform/x86: classmate-laptop: Bind to platform devices instead of ACPI ones Rafael J. Wysocki
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=23097445.EfDdHjke4D@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=cascardo@holoscopio.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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