diff options
Diffstat (limited to 'drivers/staging/usbip/usbip_common.c')
-rw-r--r-- | drivers/staging/usbip/usbip_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 7b97df6f2a42..e3fc749c1e7e 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -45,19 +45,20 @@ MODULE_PARM_DESC(usbip_debug_flag, "debug flags (defined in usbip_common.h)"); struct device_attribute dev_attr_usbip_debug; EXPORT_SYMBOL_GPL(dev_attr_usbip_debug); -static ssize_t show_flag(struct device *dev, struct device_attribute *attr, - char *buf) +static ssize_t usbip_debug_show(struct device *dev, + struct device_attribute *attr, char *buf) { return sprintf(buf, "%lx\n", usbip_debug_flag); } -static ssize_t store_flag(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) +static ssize_t usbip_debug_store(struct device *dev, + struct device_attribute *attr, const char *buf, + size_t count) { sscanf(buf, "%lx", &usbip_debug_flag); return count; } -DEVICE_ATTR(usbip_debug, (S_IRUGO | S_IWUSR), show_flag, store_flag); +DEVICE_ATTR_RW(usbip_debug); static void usbip_dump_buffer(char *buff, int bufflen) { |