diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-03-08 17:11:17 +0200 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2022-03-18 20:31:14 +0100 |
commit | f15c3dea5ed75d6f646802656d97d779dd69e683 (patch) | |
tree | 59438c237c4ac9c01b074716b7d47309a4e24d01 /drivers/auxdisplay | |
parent | 44bb3f038eb5583ae1fdd74f088e9e6235c3875e (diff) |
auxdisplay: lcd2s: use module_i2c_driver to simplify the code
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r-- | drivers/auxdisplay/lcd2s.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c index 70dd81f7e426..bf484286c6e4 100644 --- a/drivers/auxdisplay/lcd2s.c +++ b/drivers/auxdisplay/lcd2s.c @@ -371,24 +371,7 @@ static struct i2c_driver lcd2s_i2c_driver = { .remove = lcd2s_i2c_remove, .id_table = lcd2s_i2c_id, }; - -static int __init lcd2s_modinit(void) -{ - int ret = 0; - - ret = i2c_add_driver(&lcd2s_i2c_driver); - if (ret != 0) - pr_err("Failed to register lcd2s driver\n"); - - return ret; -} -module_init(lcd2s_modinit) - -static void __exit lcd2s_exit(void) -{ - i2c_del_driver(&lcd2s_i2c_driver); -} -module_exit(lcd2s_exit) +module_i2c_driver(lcd2s_i2c_driver); MODULE_DESCRIPTION("LCD2S character display driver"); MODULE_AUTHOR("Lars Poeschel"); |