提交 0a020022 编写于 作者: D Dmitry Torokhov 提交者: Jean Delvare

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: NDmitry Torokhov <dtor@mail.ru>
Acked-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 810ad7b6
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册