Re: [PATCH v2 3/3] hwmon: (sysfs) Allow drivers to register const attributes

Guenter Roeck <[email protected]>
Newsgroups org.kernel.vger.linux-hwmon,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Aug 06, 2026 at 08:09:13AM +0200, Thomas Weißschuh wrote:
> Switch to the __DEVICE_ATTR() macro which can handle callbacks taking
> both const and non-const attribute structure arguments.
> Allow the step-wise migration of the drivers.
> 
> Also use container_of_const() over container_of() to avoid casting away
> the constness accidentally.
> 
> Signed-off-by: Thomas Weißschuh <[email protected]>

Applied.

Thanks,
Guenter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.