]> git.itanic.dy.fi Git - linux-stable/commitdiff
gpio: mockup: Fix mode of debugfs files
authorZev Weiss <zev@bewilderbeest.net>
Wed, 17 May 2023 05:47:56 +0000 (22:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:57:57 +0000 (12:57 +0100)
commit 0a1bb16e0fe6650c3841e611de374bfd5578ad70 upstream.

This driver's debugfs files have had a read operation since commit
2a9e27408e12 ("gpio: mockup: rework debugfs interface"), but were
still being created with write-only mode bits.  Update them to
indicate that the files can also be read.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Fixes: 2a9e27408e12 ("gpio: mockup: rework debugfs interface")
Cc: stable@kernel.org # v5.1+
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-mockup.c

index 876027fdefc9543e4835839cbe2939a8671c8918..e20b60432e01d6f748dbf9cbc5acf199dcd2a987 100644 (file)
@@ -370,7 +370,7 @@ static void gpio_mockup_debugfs_setup(struct device *dev,
                priv->offset = i;
                priv->desc = &gc->gpiodev->descs[i];
 
-               debugfs_create_file(name, 0200, chip->dbg_dir, priv,
+               debugfs_create_file(name, 0600, chip->dbg_dir, priv,
                                    &gpio_mockup_debugfs_ops);
        }
 }