summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2017-12-19 21:15:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-09 18:33:31 +0300
commitb6b996b6cdeecf7e1646c87422e04e446ddce124 (patch)
treeef1b873db80200b159624ce2611137024abf1672 /drivers/usb
parent353c6ddaa963d453dc56ced2f3cbfd9bd57409c7 (diff)
downloadlinux-b6b996b6cdeecf7e1646c87422e04e446ddce124.tar.xz
treewide: Use DEVICE_ATTR_RW
Convert DEVICE_ATTR uses to DEVICE_ATTR_RW 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*S_IWUSR|\s*S_IWUSR\s*\|\s*S_IRUGO\s*|\s*0644\s*)\)?\s*,\s*\1_show\s*,\s*\1_store\s*\)/DEVICE_ATTR_RW(\1)/g; print;}' Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/phy/phy-tahvo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index b3ce42edb373..7f7c5c82420d 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -310,7 +310,7 @@ static ssize_t otg_mode_store(struct device *device,
return r;
}
-static DEVICE_ATTR(otg_mode, 0644, otg_mode_show, otg_mode_store);
+static DEVICE_ATTR_RW(otg_mode);
static struct attribute *tahvo_attributes[] = {
&dev_attr_vbus.attr,