aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-sysfs.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2024-10-14 12:18:30 +0000
committerBartosz Golaszewski <[email protected]>2024-10-17 06:53:02 +0000
commitb6f7aeaf1bfd8d78d55868f0857e397b06a01777 (patch)
treeaa2ae7c5ef3bdf22f0e8a16ba607980005a39428 /drivers/gpio/gpiolib-sysfs.c
parentgpio: ljca: use devm_mutex_init() to simplify the error path and remove() (diff)
downloadkernel-b6f7aeaf1bfd8d78d55868f0857e397b06a01777.tar.gz
kernel-b6f7aeaf1bfd8d78d55868f0857e397b06a01777.zip
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: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r--drivers/gpio/gpiolib-sysfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 20426d6e04d5..0c713baa7784 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -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,
+ .class_groups = gpio_class_groups,
};
-
/**
* gpiod_export - export a GPIO through sysfs
* @desc: GPIO to make available, already requested