mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 14:34:28 +08:00
usb: gadget: udc-core: anywone can read 'speed' attributes
current code only allows the file owner (usually root) to read current_speed and maximum_speed sysfs files. Let anyone read those. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
ddf47ccbfe
commit
a5fcb066d2
@ -471,7 +471,7 @@ ssize_t usb_udc_##param##_show(struct device *dev, \
|
||||
return snprintf(buf, PAGE_SIZE, "%s\n", \
|
||||
usb_speed_string(udc->gadget->param)); \
|
||||
} \
|
||||
static DEVICE_ATTR(name, S_IRUSR, usb_udc_##param##_show, NULL)
|
||||
static DEVICE_ATTR(name, S_IRUGO, usb_udc_##param##_show, NULL)
|
||||
|
||||
static USB_UDC_SPEED_ATTR(current_speed, speed);
|
||||
static USB_UDC_SPEED_ATTR(maximum_speed, max_speed);
|
||||
|
Loading…
Reference in New Issue
Block a user