Re: [PATCH v5 07/14] mfd: lm3533: Use dev_groups in struct device_driver

From: Andy Shevchenko

Date: Thu Jun 25 2026 - 03:24:12 EST


On Wed, Jun 17, 2026 at 11:00:24AM +0300, Svyatoslav Ryhel wrote:
> Instead of creating and removing the device sysfs attributes directly
> during probe and remove of the driver, respectively, use dev_groups in
> struct device_driver to point to the attribute definitions and let the
> core take care of creating and removing them.
>
> No intentional functional impact.

Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
And thanks for doing that!

...

> .attrs = lm3533_attributes
> };
>
> +static const struct attribute_group *lm3533_attribute_groups[] = {
> + &lm3533_attribute_group,
> + NULL,
> +};

We have ATTRIBUTE_GROUPS() macro.

...

> +++ b/drivers/video/backlight/lm3533_bl.c

Same as per above.


--
With Best Regards,
Andy Shevchenko