mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: pca9450: Convert to use module_i2c_driver
@ 2020-07-25  1:44 Axel Lin
  2020-07-27 13:56 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2020-07-25  1:44 UTC (permalink / raw)
  To: Mark Brown; +Cc: Robin Gong, Liam Girdwood, linux-kernel, Axel Lin

Use module_i2c_driver to simplify driver init boilerplate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/pca9450-regulator.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 02250459aa90..eb5822bf53e0 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -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");
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: pca9450: Convert to use module_i2c_driver
  2020-07-25  1:44 [PATCH] regulator: pca9450: Convert to use module_i2c_driver Axel Lin
@ 2020-07-27 13:56 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-07-27 13:56 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood, Robin Gong

On Sat, 25 Jul 2020 09:44:14 +0800, Axel Lin wrote:
> Use module_i2c_driver to simplify driver init boilerplate.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: pca9450: Convert to use module_i2c_driver
      commit: 3bda44ffd93bf91fb3326336acf7ff163b1ce97d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-27 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25  1:44 [PATCH] regulator: pca9450: Convert to use module_i2c_driver Axel Lin
2020-07-27 13:56 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®