Skip to content

Commit

Permalink
regulator: pca9450: Convert to use module_i2c_driver
Browse files Browse the repository at this point in the history
Use module_i2c_driver to simplify driver init boilerplate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200725014414.1825183-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Jul 27, 2020
1 parent 9177514 commit 3bda44f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/regulator/pca9450-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,17 +826,7 @@ static struct i2c_driver pca9450_i2c_driver = {
.probe = pca9450_i2c_probe,
};

static int __init pca9450_i2c_init(void)
{
return i2c_add_driver(&pca9450_i2c_driver);
}
module_init(pca9450_i2c_init);

static void __exit pca9450_i2c_exit(void)
{
i2c_del_driver(&pca9450_i2c_driver);
}
module_exit(pca9450_i2c_exit);
module_i2c_driver(pca9450_i2c_driver);

MODULE_AUTHOR("Robin Gong <yibin.gong@nxp.com>");
MODULE_DESCRIPTION("NXP PCA9450 Power Management IC driver");
Expand Down

0 comments on commit 3bda44f

Please sign in to comment.