Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1564610

[PATCH 4/5] Input: misc/dm355evm_keys - drop unnecessary call to input_set_drvdata

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject [PATCH 4/5] Input: misc/dm355evm_keys - drop unnecessary call to input_set_drvdata
Date 2017-01-23 01:50 +0100
Message-ID <t2AZA-7To-25@gated-at.bofh.it> (permalink)
References <t2AZz-7To-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Since there is no call to dev_get_drvdata() or input_get_drvdata(),
the call to input_set_drvdata() is unnecessary and can be dropped.

The conversion was done automatically using the following coccinelle
script.

@used@
@@

(
input_get_drvdata(...)
|
dev_get_drvdata(...)
)

@depends on !used@
@@

- input_set_drvdata(...);

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/input/misc/dm355evm_keys.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c
index b6b7bd4e5462..82e272ebc0ed 100644
--- a/drivers/input/misc/dm355evm_keys.c
+++ b/drivers/input/misc/dm355evm_keys.c
@@ -195,8 +195,6 @@ static int dm355evm_keys_probe(struct platform_device *pdev)
 		goto fail1;
 	keys->irq = status;
 
-	input_set_drvdata(input, keys);
-
 	input->name = "DM355 EVM Controls";
 	input->phys = "dm355evm/input0";
 	input->dev.parent = &pdev->dev;
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] Input: Drop unnecessary calls to input_set_drvdata Guenter Roeck <linux@roeck-us.net> - 2017-01-23 01:50 +0100
  [PATCH 4/5] Input: misc/dm355evm_keys - drop unnecessary call to input_set_drvdata Guenter Roeck <linux@roeck-us.net> - 2017-01-23 01:50 +0100
  [PATCH 1/5] Input: keyboard - drop unnecessary calls to input_set_drvdata Guenter Roeck <linux@roeck-us.net> - 2017-01-23 01:50 +0100
  [PATCH 5/5] Input: touchscreen - drop unnecessary calls to input_set_drvdata Guenter Roeck <linux@roeck-us.net> - 2017-01-23 01:50 +0100
  Re: [PATCH 0/5] Input: Drop unnecessary calls to input_set_drvdata Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-23 02:40 +0100

csiph-web