misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver'
PATCH 1/1 misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver'
From: Elad Wexler <[email protected]>
Driver doesn't do anything special in 'module_init'.
'module_platform_init' makes the code more readable.
--- drivers/misc/cs5535-mfgpt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/misc/cs5535-mfgpt.c +1 -7
@@ -370,13 +370,7 @@ static struct platform_driver cs5535_mfgpt_driver = { .probe = cs5535_mfgpt_probe, }; - -static int __init cs5535_mfgpt_init (void ) -{ -return platform_driver_register (&cs5535_mfgpt_driver); -} - -module_init (cs5535_mfgpt_init); +module_platform_driver (cs5535_mfgpt_driver);MODULE_AUTHOR ("Andres Salomon <[email protected]>" );MODULE_DESCRIPTION ("CS5535/CS5536 MFGPT timer driver" );
Signature · 1 line
1.7.9.5
Quoted 7 lines · On Sat, Sep 28, 2013 at 8:14 PM, <[email protected]> wrote:
From: Elad Wexler <[email protected]>
Driver doesn't do anything special in '
module_init'.'
module_platform_init' makes the code more readable.Signed-off-by Elad Wexler <[email protected]>
NAK.
By moving to module_platform_init() you make this module unloadable. Currently it is unloadable for good reasons.
The cs5535-mfgpt chip is nasty because it has no reliable reset function. Therefore by unloading and loading the module again bad things can happen.
Signature · 2 lines
Thanks, //richard
Quoted 7 lines · richard -rw- weinberger
Quoted 6 lines · On Sat, Sep 28, 2013 at 8:14 PM, <[email protected]> wrote:
From: Elad Wexler <[email protected]>
Driver doesn't do anything special in '
module_init'.'
module_platform_init' makes the code more readable.
Quoted 9 lines
Quoted 1 line
Signed-off-by Elad Wexler <[email protected]>NAK.
By moving to
module_platform_init()you make this module unloadable. Currently it is unloadable for good reasons.
The cs5535-mfgpt chip is nasty because it has no reliable reset function. Therefore by unloading and loading the module again bad things can happen.
I think this HW information should be well documented. Explaining the reason why it doesn't implemented the 'module_exit'
Quoted 3 lines
Signature · 2 lines
Thanks, //richard
Am 29.09.2013 00:14, schrieb Elad Wexler:
Quoted 12 lines · richard -rw- weinberger
Quoted 11 lines · On Sat, Sep 28, 2013 at 8:14 PM, <[email protected]> wrote:
Quoted 7 lines
From: Elad Wexler <[email protected]>
Driver doesn't do anything special in '
module_init'.'
module_platform_init' makes the code more readable.Signed-off-by Elad Wexler <[email protected]>NAK.
Quoted 7 lines
Quoted 5 lines
By moving to
module_platform_init()you make this module unloadable. Currently it is unloadable for good reasons.
The cs5535-mfgpt chip is nasty because it has no reliable reset function. Therefore by unloading and loading the module again bad things can happen.I think this HW information should be well documented. Explaining the reason why it doesn't implemented the '
module_exit'
Usually if a driver does not implement the exit function it's because of hardware limitations.
IOW, the alarm bell rings. ;-)
Thanks,
//richard