diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2012-05-09 01:30:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-10 23:39:05 -0400 |
commit | 71b3e938cb97f6cf324fb5aaca46d8e400dc38f0 (patch) | |
tree | 42ec7e0e5588e5d042dcd44bb77057b09f4c4f3d /drivers/input | |
parent | 3a73c8169e4f56c1161a95985b8489dd04a7bcbe (diff) |
Input: atmel_mxt_ts - only allow root to update firmware
Restrict permissions on the update_fw sysfs entry to read only for root
only.
Also, update object permission to use a macro S_IRUGO macro instead of
hard coded 0444.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 0a6e368a5a9c..15ae6fd575b2 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -1049,8 +1049,8 @@ static ssize_t mxt_update_fw_store(struct device *dev, | |||
1049 | return count; | 1049 | return count; |
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | static DEVICE_ATTR(object, 0444, mxt_object_show, NULL); | 1052 | static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); |
1053 | static DEVICE_ATTR(update_fw, 0664, NULL, mxt_update_fw_store); | 1053 | static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); |
1054 | 1054 | ||
1055 | static struct attribute *mxt_attrs[] = { | 1055 | static struct attribute *mxt_attrs[] = { |
1056 | &dev_attr_object.attr, | 1056 | &dev_attr_object.attr, |