linux-stable/drivers/usb/wusbcore
Julia Lawall 42cda7d8d3 wusbcore: wusbhc: use permission-specific DEVICE_ATTR variants
Use DEVICE_ATTR_RW for read-write attributes.  This simplifies the
source code, improves readbility, and reduces the chance of
inconsistencies.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@rw@
declarer name DEVICE_ATTR;
identifier x,x_show,x_store;
@@

DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);

@script:ocaml@
x << rw.x;
x_show << rw.x_show;
x_store << rw.x_store;
@@

if not (x^"_show" = x_show && x^"_store" = x_store)
then Coccilib.include_match false

@@
declarer name DEVICE_ATTR_RW;
identifier rw.x,rw.x_show,rw.x_store;
@@

- DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
+ DEVICE_ATTR_RW(x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:19:49 +01:00
..
cbaf.c USB: wusbcore: add in missing white space in error message text 2016-09-13 17:24:24 +02:00
crypto.c wusb: fix error return code in wusb_prf() 2016-10-19 15:28:29 +02:00
dev-sysfs.c wusbcore: dev-sysfs: use permission-specific DEVICE_ATTR variants 2016-11-07 10:19:49 +01:00
devconnect.c usb: wusbcore: remove unreachable code 2016-04-19 04:33:15 +09:00
Kconfig usb: wusbcore: USB_WUSB_CBAF depends on USB 2014-09-23 22:06:33 -07:00
Makefile
mmc.c usb: wusbcore: fix panic in wusbhc_chid_set 2014-04-24 12:45:41 -07:00
pal.c usb: wusbcore: add debug prints to reservation and channel change 2013-12-20 12:06:46 -08:00
reservation.c usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
rh.c wusbcore: rh: use USB_DT_HUB 2015-04-03 19:03:15 +02:00
security.c usb: wusbcore: security: don't print on ENOMEM 2016-08-30 19:17:39 +02:00
wa-hc.c usb: wusbcore: use multiple urbs for HWA iso transfer result frame reads 2014-03-08 22:30:28 -08:00
wa-hc.h usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
wa-nep.c usb: wusbcore: wa-nep: don't print on ENOMEM 2016-08-30 19:17:39 +02:00
wa-rpipe.c usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
wa-xfer.c usb: wusbcore: wa-xfer: don't print error when allocating urb fails 2016-08-15 15:54:27 +02:00
wusbhc.c wusbcore: wusbhc: use permission-specific DEVICE_ATTR variants 2016-11-07 10:19:49 +01:00
wusbhc.h USB: core, wusbcore: use bus_to_hcd 2016-01-24 21:00:33 -08:00