# \[PATCH\] drivers: input: use module\_platform\_driver\_probe()

- From: Fabio Porcedda \<hidden\>
- Date: 2013-03-14 17:49:14 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2013/03/8921153
- Thread: https://ratatoskr.run/linux-input/2013/03/8921153/t.md

```text
This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Fabio Porcedda <redacted>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
v3:
  - removed already converted drivers

 drivers/input/touchscreen/mc13783_ts.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c
index 02103b6..89308fe 100644
--- a/drivers/input/touchscreen/mc13783_ts.c
+++ b/drivers/input/touchscreen/mc13783_ts.c
@@ -250,17 +250,7 @@ static struct platform_driver mc13783_ts_driver = {
 	},
 };
 
-static int __init mc13783_ts_init(void)
-{
-	return platform_driver_probe(&mc13783_ts_driver, &mc13783_ts_probe);
-}
-module_init(mc13783_ts_init);
-
-static void __exit mc13783_ts_exit(void)
-{
-	platform_driver_unregister(&mc13783_ts_driver);
-}
-module_exit(mc13783_ts_exit);
+module_platform_driver_probe(mc13783_ts_driver, mc13783_ts_probe);
 
 MODULE_DESCRIPTION("MC13783 input touchscreen driver");
 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
-- 
1.8.1.5

```
