From d8fcbad91a22be905b5fd8aec26ce1cc3b950d98 Mon Sep 17 00:00:00 2001 From: Marco Felsch Date: Thu, 18 Oct 2018 12:19:31 +0200 Subject: i2c: introduce device_i2c_driver() macro Add macro and dependency to avoid boilerplate code. Since now simple i2c drivers only have to include the i2c.h header and call the device_i2c_driver() macro to register a i2c device driver. Signed-off-by: Marco Felsch Signed-off-by: Sascha Hauer --- drivers/input/qt1070.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/qt1070.c b/drivers/input/qt1070.c index d81a8fa401..59acee5c39 100644 --- a/drivers/input/qt1070.c +++ b/drivers/input/qt1070.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -284,10 +283,4 @@ static struct driver_d qt1070_driver = { .name = "qt1070", .probe = qt1070_probe, }; - -static int qt1070_init(void) -{ - i2c_driver_register(&qt1070_driver); - return 0; -} -device_initcall(qt1070_init); +device_i2c_driver(qt1070_driver); -- cgit v1.2.3