Re: [PATCH v2] staging: fbtft: convert sysfs attributes to use ATTRIBUTE_GROUPS

From: Andy Shevchenko

Date: Tue May 12 2026 - 15:16:24 EST


On Tue, May 12, 2026 at 06:30:06PM +0000, Harshit Shaw wrote:
> Replace direct device_create_file() calls with the correct
> ATTRIBUTE_GROUPS() macro. Add fbtft_groups as dev_groups in the
> driver structure so the driver core automatically adds and removes
> the sysfs attributes when a device is bound or unbound.

> Signed-off-by: Harshit Shaw <shawharshit116@xxxxxxxxx>
> ---
> v2: - Use DEVICE_ATTR_RW() macro instead of DEVICE_ATTR()
> - Move DEVICE_ATTR_RW() definitions closer to their callbacks
> - Remove trailing comma after NULL in attribute array
> - Remove extern declaration from internal.h, not needed
> - Use ATTRIBUTE_GROUPS() macro and add dev_groups to driver
> structure as suggested by Greg KH and Andy Shevchenko
> - Compile tested with: make M=drivers/staging/fbtft modules

Thanks for the update!

...

> +static struct attribute *fbtft_attrs[] = {
>

Now it has stray blank line here.

> + &dev_attr_debug.attr,
> + &dev_attr_gamma.attr,
> + NULL
> +};

...

Otherwise LGTM, and if Sashiko and others are happy with it
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko