Re: [-next PATCH 3/4] treewide: Use DEVICE_ATTR_RO

2017-12-20 Thread Zhang Rui
On Tue, 2017-12-19 at 10:15 -0800, Joe Perches wrote: > Convert DEVICE_ATTR uses to DEVICE_ATTR_RO where possible. > > Done with perl script: > > $ git grep -w --name-only DEVICE_ATTR | \ >   xargs perl -i -e 'local $/; while (<>) { >

[-next PATCH 3/4] treewide: Use DEVICE_ATTR_RO

2017-12-19 Thread Joe Perches
Convert DEVICE_ATTR uses to DEVICE_ATTR_RO where possible. Done with perl script: $ git grep -w --name-only DEVICE_ATTR | \ xargs perl -i -e 'local $/; while (<>) { s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(?:\s*S_IRUGO\s*|\s*0444\s*)\)?\s*,\s*\1_show\s*,\s*NULL\s*\)/DEVICE_ATTR_RO(\1)/g;