forked from Minki/linux
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>
This commit is contained in:
parent
44bb3f038e
commit
f15c3dea5e
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user