drivers/hid/hid-picolcd_fb: avoid world-writable sysfs files.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 14 May 2014 01:03:50 +0000 (10:33 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 14 May 2014 01:23:56 +0000 (10:53 +0930)
In line with practice for module parameters, we're adding a build-time
check that sysfs files aren't world-writable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Bruno Prémont <bonbons@linux-vserver.org>
Acked-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd_fb.c

index c930ab8..7f965e2 100644 (file)
@@ -501,7 +501,7 @@ static ssize_t picolcd_fb_update_rate_store(struct device *dev,
        return count;
 }
 
-static DEVICE_ATTR(fb_update_rate, 0666, picolcd_fb_update_rate_show,
+static DEVICE_ATTR(fb_update_rate, 0664, picolcd_fb_update_rate_show,
                picolcd_fb_update_rate_store);
 
 /* initialize Framebuffer device */