USB: usbip: convert to use DRIVER_ATTR_RW

We are trying to get rid of DRIVER_ATTR(), and the usbip driver
attribute can be trivially changed to use DRIVER_ATTR_RW().

Cc: Valentina Manea <valentina.manea.m@gmail.com>
Cc: <linux-usb@vger.kernel.org>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2017-06-09 11:03:14 +02:00
parent 36369569ad
commit cc3d53def8
1 changed files with 3 additions and 4 deletions

View File

@ -134,7 +134,7 @@ out:
return ret; return ret;
} }
static ssize_t show_match_busid(struct device_driver *drv, char *buf) static ssize_t match_busid_show(struct device_driver *drv, char *buf)
{ {
int i; int i;
char *out = buf; char *out = buf;
@ -149,7 +149,7 @@ static ssize_t show_match_busid(struct device_driver *drv, char *buf)
return out - buf; return out - buf;
} }
static ssize_t store_match_busid(struct device_driver *dev, const char *buf, static ssize_t match_busid_store(struct device_driver *dev, const char *buf,
size_t count) size_t count)
{ {
int len; int len;
@ -181,8 +181,7 @@ static ssize_t store_match_busid(struct device_driver *dev, const char *buf,
return -EINVAL; return -EINVAL;
} }
static DRIVER_ATTR(match_busid, S_IRUSR | S_IWUSR, show_match_busid, static DRIVER_ATTR_RW(match_busid);
store_match_busid);
static ssize_t rebind_store(struct device_driver *dev, const char *buf, static ssize_t rebind_store(struct device_driver *dev, const char *buf,
size_t count) size_t count)