From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Harshit Shaw <shawharshit116@gmail.com>
Cc: deller@gmx.de, gregkh@linuxfoundation.org, chintanlike@gmail.com,
tzimmermann@suse.de, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fbtft: convert sysfs attributes to use attribute_group
Date: Tue, 12 May 2026 13:58:42 +0300 [thread overview]
Message-ID: <agMH4iSB1-30ucu3@ashevche-desk.local> (raw)
In-Reply-To: <20260512092817.1941-1-shawharshit116@gmail.com>
On Tue, May 12, 2026 at 09:28:17AM +0000, Harshit Shaw wrote:
> Replace direct device_create_file() and device_remove_file() calls
> with the correct attribute_group API using sysfs_create_group() and
> sysfs_remove_group(). This is the proper way to register sysfs
> attributes in kernel drivers.
...
> +static DEVICE_ATTR(gamma, 0644, show_gamma_curve, store_gamma_curve);
> +static DEVICE_ATTR(debug, 0644, show_debug, store_debug);
Move each of them closer to the used callbacks. Also there is DEVICE_ATTR_RW()
macro.
...
> +static struct attribute *fbtft_attrs[] = {
> + &dev_attr_debug.attr,
> + NULL,
Don't put trailing commas in terminator entries.
> +};
...
> +static struct attribute *fbtft_gamma_attrs[] = {
> + &dev_attr_gamma.attr,
> + NULL,
Ditto.
> +};
...
Also these definitions should be moved closer to the related initialisers.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-05-12 10:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 9:28 [PATCH] staging: fbtft: convert sysfs attributes to use attribute_group Harshit Shaw
2026-05-12 9:44 ` Greg KH
2026-05-12 10:58 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agMH4iSB1-30ucu3@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=chintanlike@gmail.com \
--cc=deller@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=shawharshit116@gmail.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox