Re: [PATCH v4] staging: fbtft: convert sysfs attributes to use ATTRIBUTE_GROUPS
From: Greg KH
Date: Wed May 13 2026 - 06:39:45 EST
On Wed, May 13, 2026 at 08:59:48AM +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>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> ---
> v4: Fix build error - add extern declaration of fbtft_groups in
> fbtft.h so all drivers using FBTFT_REGISTER_DRIVER macro can
> see the symbol
> v3: Remove stray blank line in fbtft_attrs[] array
> 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
> - 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
I see too many v4 versions on the list for there really to be just 1 v4
:(
Please wait a bit, take some time, and resubmit a new version after a
few days making sure it's all correct. There is no rush or deadline
here.
thanks,
greg k-h