Skip to content

Commit

Permalink
i2c/gpio-i2cmux: Convert to use module_platform_driver()
Browse files Browse the repository at this point in the history
Convert gpio-i2cmux to use the module_platform_driver() macro which
makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Axel Lin authored and Jean Delvare committed Jan 12, 2012
1 parent a3664b5 commit 245e99c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/i2c/muxes/gpio-i2cmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,7 @@ static struct platform_driver gpiomux_driver = {
},
};

static int __init gpiomux_init(void)
{
return platform_driver_register(&gpiomux_driver);
}

static void __exit gpiomux_exit(void)
{
platform_driver_unregister(&gpiomux_driver);
}

module_init(gpiomux_init);
module_exit(gpiomux_exit);
module_platform_driver(gpiomux_driver);

MODULE_DESCRIPTION("GPIO-based I2C multiplexer driver");
MODULE_AUTHOR("Peter Korsgaard <peter.korsgaard@barco.com>");
Expand Down

0 comments on commit 245e99c

Please sign in to comment.