提交 a5fcb066 编写于 作者: F Felipe Balbi

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: NFelipe Balbi <balbi@ti.com>
上级 ddf47ccb
...@@ -471,7 +471,7 @@ ssize_t usb_udc_##param##_show(struct device *dev, \ ...@@ -471,7 +471,7 @@ ssize_t usb_udc_##param##_show(struct device *dev, \
return snprintf(buf, PAGE_SIZE, "%s\n", \ return snprintf(buf, PAGE_SIZE, "%s\n", \
usb_speed_string(udc->gadget->param)); \ 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(current_speed, speed);
static USB_UDC_SPEED_ATTR(maximum_speed, max_speed); static USB_UDC_SPEED_ATTR(maximum_speed, max_speed);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册