diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2021-05-17 13:07:45 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-06-16 18:47:49 +0300 |
commit | 1351f1d1e2f7d91d0b1963f7b5bf829a4982c778 (patch) | |
tree | 7c890237ba594f82aacdbc8ca367eb8c5cf881a8 /drivers/platform/x86/samsung-laptop.c | |
parent | 5b6a9a2f839c7e1863606a00f505ac50b8887287 (diff) | |
download | linux-1351f1d1e2f7d91d0b1963f7b5bf829a4982c778.tar.xz |
platform/x86: samsung-laptop: set debugfs blobs to read only
Those blobs can only be read. So, don't confuse users with 'writable'
flags. Also, remove S_IFREG because debugfs takes care of that.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210517100746.29663-2-wsa+renesas@sang-engineering.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/samsung-laptop.c')
-rw-r--r-- | drivers/platform/x86/samsung-laptop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 763d97cbbe53..7ee010aa740a 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -1296,12 +1296,12 @@ static void samsung_debugfs_init(struct samsung_laptop *samsung) debugfs_create_u32("d1", 0644, root, &samsung->debug.data.d1); debugfs_create_u16("d2", 0644, root, &samsung->debug.data.d2); debugfs_create_u8("d3", 0644, root, &samsung->debug.data.d3); - debugfs_create_blob("data", 0644, root, &samsung->debug.data_wrapper); - debugfs_create_blob("f0000_segment", 0600, root, + debugfs_create_blob("data", 0444, root, &samsung->debug.data_wrapper); + debugfs_create_blob("f0000_segment", 0400, root, &samsung->debug.f0000_wrapper); - debugfs_create_file("call", S_IFREG | 0444, root, samsung, + debugfs_create_file("call", 0444, root, samsung, &samsung_laptop_call_fops); - debugfs_create_blob("sdiag", 0644, root, &samsung->debug.sdiag_wrapper); + debugfs_create_blob("sdiag", 0444, root, &samsung->debug.sdiag_wrapper); } static void samsung_sabi_exit(struct samsung_laptop *samsung) |