]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/usbip/usbip_common.c
Merge tag 'for-linville-20131203' of git://github.com/kvalo/ath
[~andy/linux] / drivers / staging / usbip / usbip_common.c
index 7b97df6f2a42208d065b88819db853ff31e1f542..e3fc749c1e7e016b217d627d8a5aedeb767fcb97 100644 (file)
@@ -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)
 {