diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-09 05:03:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-12 10:14:31 -0400 |
commit | cc3d53def83a99636e16ceb70a79eedc61fddc23 (patch) | |
tree | 3cdc95a1ef5964f52e5c4409868c77a4949278db /drivers/usb/usbip/stub_main.c | |
parent | 36369569adc767a5f3c680c85b5fca6664511722 (diff) |
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>
Diffstat (limited to 'drivers/usb/usbip/stub_main.c')
-rw-r--r-- | drivers/usb/usbip/stub_main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c index 44ab43fc4fcc..e74fbb7f4a32 100644 --- a/drivers/usb/usbip/stub_main.c +++ b/drivers/usb/usbip/stub_main.c | |||
@@ -134,7 +134,7 @@ out: | |||
134 | return ret; | 134 | return ret; |
135 | } | 135 | } |
136 | 136 | ||
137 | static ssize_t show_match_busid(struct device_driver *drv, char *buf) | 137 | static ssize_t match_busid_show(struct device_driver *drv, char *buf) |
138 | { | 138 | { |
139 | int i; | 139 | int i; |
140 | char *out = buf; | 140 | char *out = buf; |
@@ -149,7 +149,7 @@ static ssize_t show_match_busid(struct device_driver *drv, char *buf) | |||
149 | return out - buf; | 149 | return out - buf; |
150 | } | 150 | } |
151 | 151 | ||
152 | static ssize_t store_match_busid(struct device_driver *dev, const char *buf, | 152 | static ssize_t match_busid_store(struct device_driver *dev, const char *buf, |
153 | size_t count) | 153 | size_t count) |
154 | { | 154 | { |
155 | int len; | 155 | int len; |
@@ -181,8 +181,7 @@ static ssize_t store_match_busid(struct device_driver *dev, const char *buf, | |||
181 | 181 | ||
182 | return -EINVAL; | 182 | return -EINVAL; |
183 | } | 183 | } |
184 | static DRIVER_ATTR(match_busid, S_IRUSR | S_IWUSR, show_match_busid, | 184 | static DRIVER_ATTR_RW(match_busid); |
185 | store_match_busid); | ||
186 | 185 | ||
187 | static ssize_t rebind_store(struct device_driver *dev, const char *buf, | 186 | static ssize_t rebind_store(struct device_driver *dev, const char *buf, |
188 | size_t count) | 187 | size_t count) |