forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mfd: Add mfd_clone_cell(), convert cs5535-mfd/olpc-xo1 to it
Replace mfd_shared_platform_driver_register with mfd_clone_cell. The former was called by an mfd client, and registered both a platform driver and device. The latter is called by an mfd driver, and registers only a platform device. The downside of this is that mfd drivers need to be modified whenever new clients are added that share a cell; the upside is that it fits Linux's driver model better. It's also simpler. This also converts cs5535-mfd/olpc-xo1 from the old API. cs5535-mfd now creates the olpc-xo1-{acpi,pms} devices, while olpc-xo1 binds to them via platform drivers. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
- Loading branch information
Showing
4 changed files
with
52 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,22 +121,21 @@ static int __init olpc_xo1_init(void) | |
{ | ||
int r; | ||
|
||
r = mfd_shared_platform_driver_register(&cs5535_pms_drv, "cs5535-pms"); | ||
r = platform_driver_register(&cs5535_pms_drv); | ||
if (r) | ||
return r; | ||
|
||
r = mfd_shared_platform_driver_register(&cs5535_acpi_drv, | ||
"cs5535-acpi"); | ||
r = platform_driver_register(&cs5535_acpi_drv); | ||
if (r) | ||
mfd_shared_platform_driver_unregister(&cs5535_pms_drv); | ||
platform_driver_unregister(&cs5535_pms_drv); | ||
|
||
return r; | ||
} | ||
|
||
static void __exit olpc_xo1_exit(void) | ||
{ | ||
mfd_shared_platform_driver_unregister(&cs5535_acpi_drv); | ||
mfd_shared_platform_driver_unregister(&cs5535_pms_drv); | ||
platform_driver_unregister(&cs5535_acpi_drv); | ||
platform_driver_unregister(&cs5535_pms_drv); | ||
} | ||
|
||
MODULE_AUTHOR("Daniel Drake <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters