Skip to content

Commit

Permalink
usb: gadget: core: allow everybody to read sysfs attributes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Nov 14, 2011
1 parent 6f39504 commit 59d81f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/udc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand All @@ -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);
Expand Down

0 comments on commit 59d81f8

Please sign in to comment.