From 6cbaefb4bf2ce6746e49c972289702133b347ffa Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 19 Dec 2017 10:15:09 -0800 Subject: treewide: Use DEVICE_ATTR_WO Convert DEVICE_ATTR uses to DEVICE_ATTR_WO 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_IWUSR\s*|\s*0200\s*)\)?\s*,\s*NULL\s*,\s*\s_store\s*\)/DEVICE_ATTR_WO(\1)/g; print;}' Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/elants_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/touchscreen/elants_i2c.c') diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index e102d7764bc2..98613910d756 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -999,7 +999,7 @@ static ssize_t show_iap_mode(struct device *dev, "Normal" : "Recovery"); } -static DEVICE_ATTR(calibrate, S_IWUSR, NULL, calibrate_store); +static DEVICE_ATTR_WO(calibrate); static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw); -- cgit v1.2.3-59-g8ed1b