diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-10-17 11:51:12 -0400 |
---|---|---|
committer | Jean Delvare <khali@mahadeva.delvare> | 2008-10-17 11:51:12 -0400 |
commit | 0a02002268bf624a8b0eaf3b4eb5c4207bd80d8b (patch) | |
tree | f49337ad662cdcbd56a947f2f16684c95e7c49e5 /drivers/hwmon | |
parent | 810ad7b62c0f075dc44ecc781b24c7f6ba388da5 (diff) |
hwmon: (ams) Fix permissions on 'joystick' module parameter
We should not allow writes to the 'joystick' module parameters since
writing there will not trigger creation of the input device. Disable
writes since we provide alternative way of enabling input device via
AMS device's sysfs attribute.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/ams/ams-input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/ams/ams-input.c b/drivers/hwmon/ams/ams-input.c index 7b81e0c2c2d9..48dbf7d6a66d 100644 --- a/drivers/hwmon/ams/ams-input.c +++ b/drivers/hwmon/ams/ams-input.c | |||
@@ -20,11 +20,11 @@ | |||
20 | #include "ams.h" | 20 | #include "ams.h" |
21 | 21 | ||
22 | static unsigned int joystick; | 22 | static unsigned int joystick; |
23 | module_param(joystick, bool, 0644); | 23 | module_param(joystick, bool, S_IRUGO); |
24 | MODULE_PARM_DESC(joystick, "Enable the input class device on module load"); | 24 | MODULE_PARM_DESC(joystick, "Enable the input class device on module load"); |
25 | 25 | ||
26 | static unsigned int invert; | 26 | static unsigned int invert; |
27 | module_param(invert, bool, 0644); | 27 | module_param(invert, bool, S_IWUSR | S_IRUGO); |
28 | MODULE_PARM_DESC(invert, "Invert input data on X and Y axis"); | 28 | MODULE_PARM_DESC(invert, "Invert input data on X and Y axis"); |
29 | 29 | ||
30 | static void ams_idev_poll(struct input_polled_dev *dev) | 30 | static void ams_idev_poll(struct input_polled_dev *dev) |