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

From: Guenter Roeck

Date: Thu Aug 06 2026 - 15:21:05 EST


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 <linux@xxxxxxxxxxxxxx>

Applied.

Thanks,
Guenter