Re: [PATCH v5 3/4] platform/x86: int3472: Parameterize LED name in registration
From: Andy Shevchenko
Date: Mon Mar 30 2026 - 05:34:08 EST
On Fri, Mar 27, 2026 at 07:10:30PM +0100, Marco Nenciarini wrote:
> Add a name parameter to skl_int3472_register_led() to allow callers
> to specify the LED name suffix instead of hardcoding "privacy". This
> prepares for registering additional LED types with different names.
>
> No functional change.
...
> -int skl_int3472_register_led(struct int3472_discrete_device *int3472, struct gpio_desc *gpio)
> +int skl_int3472_register_led(struct int3472_discrete_device *int3472,
> + struct gpio_desc *gpio, const char *name)
I believe it's better to call it con_id...
> /* Generate the name, replacing the ':' in the ACPI devname with '_' */
> snprintf(led->name, sizeof(led->name),
> - "%s::privacy_led", acpi_dev_name(int3472->sensor));
> + "%s::%s_led", acpi_dev_name(int3472->sensor), name);
> p = strchr(led->name, ':');
> if (p)
> *p = '_';
...and replace the actual con_id assignment as well.
--
With Best Regards,
Andy Shevchenko