Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: pca9450: Convert to use module_i2c_driver

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>

authored by

Axel Lin and committed by
Mark Brown
3bda44ff 9177514c

+1 -11
+1 -11
drivers/regulator/pca9450-regulator.c
··· 826 826 .probe = pca9450_i2c_probe, 827 827 }; 828 828 829 - static int __init pca9450_i2c_init(void) 830 - { 831 - return i2c_add_driver(&pca9450_i2c_driver); 832 - } 833 - module_init(pca9450_i2c_init); 834 - 835 - static void __exit pca9450_i2c_exit(void) 836 - { 837 - i2c_del_driver(&pca9450_i2c_driver); 838 - } 839 - module_exit(pca9450_i2c_exit); 829 + module_i2c_driver(pca9450_i2c_driver); 840 830 841 831 MODULE_AUTHOR("Robin Gong <yibin.gong@nxp.com>"); 842 832 MODULE_DESCRIPTION("NXP PCA9450 Power Management IC driver");