From: Dmitry Torokhov Date: Fri, 17 Oct 2008 15:51:12 +0000 (+0200) Subject: hwmon: (ams) Fix permissions on 'joystick' module parameter X-Git-Tag: v3.12-rc1~17765^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a02002268bf624a8b0eaf3b4eb5c4207bd80d8b;p=kernel%2Fkernel-generic.git 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 Acked-by: Johannes Berg Signed-off-by: Jean Delvare --- diff --git a/drivers/hwmon/ams/ams-input.c b/drivers/hwmon/ams/ams-input.c index 7b81e0c2..48dbf7d 100644 --- a/drivers/hwmon/ams/ams-input.c +++ b/drivers/hwmon/ams/ams-input.c @@ -20,11 +20,11 @@ #include "ams.h" static unsigned int joystick; -module_param(joystick, bool, 0644); +module_param(joystick, bool, S_IRUGO); MODULE_PARM_DESC(joystick, "Enable the input class device on module load"); static unsigned int invert; -module_param(invert, bool, 0644); +module_param(invert, bool, S_IWUSR | S_IRUGO); MODULE_PARM_DESC(invert, "Invert input data on X and Y axis"); static void ams_idev_poll(struct input_polled_dev *dev)