usb: gadget: core: allow everybody to read sysfs attributes
authorFelipe Balbi <balbi@ti.com>
Mon, 3 Oct 2011 13:43:56 +0000 (16:43 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Nov 2011 19:51:17 +0000 (11:51 -0800)
Those are simply giving information about the current
state of the UDC, nothing really fancy. We can let
everybody read those.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/udc-core.c

index 4c5ff14a7c612ea00713bea64445780bc33b97fb..6939e17f4580099af82d236c413547fe3660a18d 100644 (file)
@@ -378,7 +378,7 @@ static ssize_t usb_udc_speed_show(struct device *dev,
        return snprintf(buf, PAGE_SIZE, "%s\n",
                        usb_speed_string(udc->gadget->speed));
 }
-static DEVICE_ATTR(speed, S_IRUSR, usb_udc_speed_show, NULL);
+static DEVICE_ATTR(speed, S_IRUGO, usb_udc_speed_show, NULL);
 
 #define USB_UDC_ATTR(name)                                     \
 ssize_t usb_udc_##name##_show(struct device *dev,              \
@@ -389,7 +389,7 @@ ssize_t usb_udc_##name##_show(struct device *dev,           \
                                                                \
        return snprintf(buf, PAGE_SIZE, "%d\n", gadget->name);  \
 }                                                              \
-static DEVICE_ATTR(name, S_IRUSR, usb_udc_##name##_show, NULL)
+static DEVICE_ATTR(name, S_IRUGO, usb_udc_##name##_show, NULL)
 
 static USB_UDC_ATTR(is_dualspeed);
 static USB_UDC_ATTR(is_otg);