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.
platform-drivers-x86: convert drivers/platform/x86/* to use module_pl…
…atform_driver() This patch converts the drivers in drivers/platform/x86/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Hong Liu <[email protected]> Cc: Durgadoss R <[email protected]> Cc: Daniel Drake <[email protected]> Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
- Loading branch information
Showing
3 changed files
with
3 additions
and
35 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 |
---|---|---|
|
@@ -118,17 +118,7 @@ static struct platform_driver mfld_pb_driver = { | |
.remove = __devexit_p(mfld_pb_remove), | ||
}; | ||
|
||
static int __init mfld_pb_init(void) | ||
{ | ||
return platform_driver_register(&mfld_pb_driver); | ||
} | ||
module_init(mfld_pb_init); | ||
|
||
static void __exit mfld_pb_exit(void) | ||
{ | ||
platform_driver_unregister(&mfld_pb_driver); | ||
} | ||
module_exit(mfld_pb_exit); | ||
module_platform_driver(mfld_pb_driver); | ||
|
||
MODULE_AUTHOR("Hong Liu <[email protected]>"); | ||
MODULE_DESCRIPTION("Intel Medfield Power Button Driver"); | ||
|
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 |
---|---|---|
|
@@ -565,18 +565,7 @@ static struct platform_driver mid_thermal_driver = { | |
.id_table = therm_id_table, | ||
}; | ||
|
||
static int __init mid_thermal_module_init(void) | ||
{ | ||
return platform_driver_register(&mid_thermal_driver); | ||
} | ||
|
||
static void __exit mid_thermal_module_exit(void) | ||
{ | ||
platform_driver_unregister(&mid_thermal_driver); | ||
} | ||
|
||
module_init(mid_thermal_module_init); | ||
module_exit(mid_thermal_module_exit); | ||
module_platform_driver(mid_thermal_driver); | ||
|
||
MODULE_AUTHOR("Durgadoss R <[email protected]>"); | ||
MODULE_DESCRIPTION("Intel Medfield Platform Thermal Driver"); | ||
|
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 |
---|---|---|
|
@@ -67,19 +67,8 @@ static struct platform_driver xo1_rfkill_driver = { | |
.remove = __devexit_p(xo1_rfkill_remove), | ||
}; | ||
|
||
static int __init xo1_rfkill_init(void) | ||
{ | ||
return platform_driver_register(&xo1_rfkill_driver); | ||
} | ||
|
||
static void __exit xo1_rfkill_exit(void) | ||
{ | ||
platform_driver_unregister(&xo1_rfkill_driver); | ||
} | ||
module_platform_driver(xo1_rfkill_driver); | ||
|
||
MODULE_AUTHOR("Daniel Drake <[email protected]>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_ALIAS("platform:xo1-rfkill"); | ||
|
||
module_init(xo1_rfkill_init); | ||
module_exit(xo1_rfkill_exit); |