Commit b6f7aeaf authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpio: sysfs: constify gpio class



All class functions used here take a const pointer to the class
structure. We can constify gpio_class.

While at it: remove a stray newline and use a tab in the struct
definition for consistency with the line above.

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241014121831.106532-1-brgl@bgdev.pl


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 476f18c0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -549,12 +549,11 @@ static struct attribute *gpio_class_attrs[] = {
};
ATTRIBUTE_GROUPS(gpio_class);

static struct class gpio_class = {
static const struct class gpio_class = {
	.name =		"gpio",
	.class_groups =	gpio_class_groups,
};


/**
 * gpiod_export - export a GPIO through sysfs
 * @desc: GPIO to make available, already requested