diff mbox series

[v5,05/13] platform/x86: oxpec: Rename ec group to tt_toggle

Message ID 20250317155349.1236188-6-lkml@antheas.dev (mailing list archive)
State Handled Elsewhere
Headers show
Series hwmon: (oxpsensors) Add devices, features, fix ABI and move to platform/x86 | expand

Commit Message

Antheas Kapenekakis March 17, 2025, 3:53 p.m. UTC
Currently, the EC group is used for the turbo button. However, the next
patch in the series adds support for the LED button in X1 devices, which
is only applicable for X1 devices. Therefore, rename it to prepare for
adding the second group.

Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 drivers/platform/x86/oxpec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Thomas Weißschuh March 17, 2025, 5:54 p.m. UTC | #1
On 2025-03-17 16:53:41+0100, Antheas Kapenekakis wrote:
> Currently, the EC group is used for the turbo button. However, the next
> patch in the series adds support for the LED button in X1 devices, which
> is only applicable for X1 devices. Therefore, rename it to prepare for
> adding the second group.
> 
> Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> ---
>  drivers/platform/x86/oxpec.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/oxpec.c b/drivers/platform/x86/oxpec.c
> index dc3a0871809cd..8836b3df0d57e 100644
> --- a/drivers/platform/x86/oxpec.c
> +++ b/drivers/platform/x86/oxpec.c
> @@ -681,18 +681,18 @@ static const struct hwmon_channel_info * const oxp_platform_sensors[] = {
>  	NULL,
>  };
>  
> -static struct attribute *oxp_ec_attrs[] = {
> +static struct attribute *oxp_tt_toggle_attrs[] = {
>  	&dev_attr_tt_toggle.attr,
>  	NULL
>  };
>  
> -static struct attribute_group oxp_ec_attribute_group = {
> +static struct attribute_group oxp_tt_toggle_attribute_group = {

While you touch this anyways it could be made 'const'.

>  	.is_visible = tt_toggle_is_visible,
> -	.attrs = oxp_ec_attrs,
> +	.attrs = oxp_tt_toggle_attrs,
>  };
>  
>  static const struct attribute_group *oxp_ec_groups[] = {
> -	&oxp_ec_attribute_group,
> +	&oxp_tt_toggle_attribute_group,
>  	NULL
>  };
>  
> -- 
> 2.48.1
>
diff mbox series

Patch

diff --git a/drivers/platform/x86/oxpec.c b/drivers/platform/x86/oxpec.c
index dc3a0871809cd..8836b3df0d57e 100644
--- a/drivers/platform/x86/oxpec.c
+++ b/drivers/platform/x86/oxpec.c
@@ -681,18 +681,18 @@  static const struct hwmon_channel_info * const oxp_platform_sensors[] = {
 	NULL,
 };
 
-static struct attribute *oxp_ec_attrs[] = {
+static struct attribute *oxp_tt_toggle_attrs[] = {
 	&dev_attr_tt_toggle.attr,
 	NULL
 };
 
-static struct attribute_group oxp_ec_attribute_group = {
+static struct attribute_group oxp_tt_toggle_attribute_group = {
 	.is_visible = tt_toggle_is_visible,
-	.attrs = oxp_ec_attrs,
+	.attrs = oxp_tt_toggle_attrs,
 };
 
 static const struct attribute_group *oxp_ec_groups[] = {
-	&oxp_ec_attribute_group,
+	&oxp_tt_toggle_attribute_group,
 	NULL
 };