Re: [PATCH v2] gpio: sim: access sysfs attributes as const
From: Thomas Weißschuh
Date: Mon Oct 19 2026 - 07:01:11 EST
On Mon, Oct 19, 2026 at 12:45:48PM +0200, Bartosz Golaszewski wrote:
> Use the const variant of constainer_of() to access struct
> gpio_sim_attribute which wraps the dynamically allocated sysfs
> attributes for value and pull of simulated GPIO lines in line with the
> currently preferred approach.
>
> Co-developed-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
> ---
> Thomas: thanks for the hints! The code you posted compiled fine so I
> included it in v2 and gave you credit in the footer.
Looks good! If you want:
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
(...)