aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-11-15 14:37:55 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-15 17:04:15 -0500
commit3d965875144b905d71dfb4d291c665c0794222c4 (patch)
treea515517c152af03641fe05d7c13b16d91a90b575 /drivers
parente24d7ace4e822debcb78386bf279c9aba4d7fbd1 (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')
-rw-r--r--drivers/usb/otg/langwell_otg.c9
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}
1899static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUGO, get_a_bus_req, set_a_bus_req); 1899static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUSR, get_a_bus_req, set_a_bus_req);
1900 1900
1901static ssize_t 1901static ssize_t
1902get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf) 1902get_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}
1945static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUGO, 1945static 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
1948static ssize_t 1947static ssize_t
1949get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf) 1948get_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}
1991static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUGO, get_b_bus_req, set_b_bus_req); 1990static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUSR, get_b_bus_req, set_b_bus_req);
1992 1991
1993static ssize_t 1992static ssize_t
1994set_a_clr_err(struct device *dev, struct device_attribute *attr, 1993set_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}
2015static DEVICE_ATTR(a_clr_err, S_IWUGO, NULL, set_a_clr_err); 2014static DEVICE_ATTR(a_clr_err, S_IWUSR, NULL, set_a_clr_err);
2016 2015
2017static struct attribute *inputs_attrs[] = { 2016static struct attribute *inputs_attrs[] = {
2018 &dev_attr_a_bus_req.attr, 2017 &dev_attr_a_bus_req.attr,