diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-15 14:37:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-15 17:04:15 -0500 |
commit | 3d965875144b905d71dfb4d291c665c0794222c4 (patch) | |
tree | a515517c152af03641fe05d7c13b16d91a90b575 /drivers/usb/otg | |
parent | e24d7ace4e822debcb78386bf279c9aba4d7fbd1 (diff) |
USB: OTG: langwell_otg: fix up some sysfs attribute permissions
They should not be writable by any user.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hao Wu <hao.wu@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Alek Du <alek.du@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r-- | drivers/usb/otg/langwell_otg.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/otg/langwell_otg.c b/drivers/usb/otg/langwell_otg.c index bdc3ea66be69..9fea48264fa2 100644 --- a/drivers/usb/otg/langwell_otg.c +++ b/drivers/usb/otg/langwell_otg.c | |||
@@ -1896,7 +1896,7 @@ set_a_bus_req(struct device *dev, struct device_attribute *attr, | |||
1896 | } | 1896 | } |
1897 | return count; | 1897 | return count; |
1898 | } | 1898 | } |
1899 | static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUGO, get_a_bus_req, set_a_bus_req); | 1899 | static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUSR, get_a_bus_req, set_a_bus_req); |
1900 | 1900 | ||
1901 | static ssize_t | 1901 | static ssize_t |
1902 | get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf) | 1902 | get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -1942,8 +1942,7 @@ set_a_bus_drop(struct device *dev, struct device_attribute *attr, | |||
1942 | } | 1942 | } |
1943 | return count; | 1943 | return count; |
1944 | } | 1944 | } |
1945 | static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUGO, | 1945 | static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUSR, get_a_bus_drop, set_a_bus_drop); |
1946 | get_a_bus_drop, set_a_bus_drop); | ||
1947 | 1946 | ||
1948 | static ssize_t | 1947 | static ssize_t |
1949 | get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf) | 1948 | get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -1988,7 +1987,7 @@ set_b_bus_req(struct device *dev, struct device_attribute *attr, | |||
1988 | } | 1987 | } |
1989 | return count; | 1988 | return count; |
1990 | } | 1989 | } |
1991 | static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUGO, get_b_bus_req, set_b_bus_req); | 1990 | static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUSR, get_b_bus_req, set_b_bus_req); |
1992 | 1991 | ||
1993 | static ssize_t | 1992 | static ssize_t |
1994 | set_a_clr_err(struct device *dev, struct device_attribute *attr, | 1993 | set_a_clr_err(struct device *dev, struct device_attribute *attr, |
@@ -2012,7 +2011,7 @@ set_a_clr_err(struct device *dev, struct device_attribute *attr, | |||
2012 | } | 2011 | } |
2013 | return count; | 2012 | return count; |
2014 | } | 2013 | } |
2015 | static DEVICE_ATTR(a_clr_err, S_IWUGO, NULL, set_a_clr_err); | 2014 | static DEVICE_ATTR(a_clr_err, S_IWUSR, NULL, set_a_clr_err); |
2016 | 2015 | ||
2017 | static struct attribute *inputs_attrs[] = { | 2016 | static struct attribute *inputs_attrs[] = { |
2018 | &dev_attr_a_bus_req.attr, | 2017 | &dev_attr_a_bus_req.attr, |