diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-23 17:58:34 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-08 18:37:31 -0500 |
commit | 65349d60d27e850c94544567c91ab1be3e4c0777 (patch) | |
tree | 94344d80022bd870caa8ceab73df5a51c954a5dc /drivers/mfd/mcp-sa11x0.c | |
parent | 35ca98423a4c61decc20cd1d1e78a7fd7111e4db (diff) |
mfd: Convert MFD drivers to use module_platform_driver
Factors out some boilerplate code for drivers doing the default thing
for platform driver registration. Drivers using platform_driver_probe
or an initcall other than module_init can't be converted.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mcp-sa11x0.c')
-rw-r--r-- | drivers/mfd/mcp-sa11x0.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c index 2dab02d9ac8b..02c53a0766c4 100644 --- a/drivers/mfd/mcp-sa11x0.c +++ b/drivers/mfd/mcp-sa11x0.c | |||
@@ -257,18 +257,7 @@ static struct platform_driver mcp_sa11x0_driver = { | |||
257 | /* | 257 | /* |
258 | * This needs re-working | 258 | * This needs re-working |
259 | */ | 259 | */ |
260 | static int __init mcp_sa11x0_init(void) | 260 | module_platform_driver(mcp_sa11x0_driver); |
261 | { | ||
262 | return platform_driver_register(&mcp_sa11x0_driver); | ||
263 | } | ||
264 | |||
265 | static void __exit mcp_sa11x0_exit(void) | ||
266 | { | ||
267 | platform_driver_unregister(&mcp_sa11x0_driver); | ||
268 | } | ||
269 | |||
270 | module_init(mcp_sa11x0_init); | ||
271 | module_exit(mcp_sa11x0_exit); | ||
272 | 261 | ||
273 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); | 262 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |
274 | MODULE_DESCRIPTION("SA11x0 multimedia communications port driver"); | 263 | MODULE_DESCRIPTION("SA11x0 multimedia communications port driver"); |