Skip to content

Commit

Permalink
hwmon: (ams) Fix permissions on 'joystick' module parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov authored and Jean Delvare committed Oct 17, 2008
1 parent 810ad7b commit 0a02002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/ams/ams-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a02002

Please sign in to comment.