* [PATCH] misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver'
@ 2013-09-28 18:14 elad.wexler
2013-09-28 18:54 ` richard -rw- weinberger
0 siblings, 1 reply; 4+ messages in thread
From: elad.wexler @ 2013-09-28 18:14 UTC (permalink / raw)
To: arnd, gregkh; +Cc: linux-kernel, Elad Wexler
From: Elad Wexler <elad.wexler@gmail.com>
Driver doesn't do anything special in 'module_init'.
'module_platform_init' makes the code more readable.
Signed-off-by: Elad Wexler <elad.wexler@gmail.com>
---
drivers/misc/cs5535-mfgpt.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c
index effd8c6..abf1a3c 100644
--- a/drivers/misc/cs5535-mfgpt.c
+++ b/drivers/misc/cs5535-mfgpt.c
@@ -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 <dilinger@queued.net>");
MODULE_DESCRIPTION("CS5535/CS5536 MFGPT timer driver");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver'
2013-09-28 18:14 [PATCH] misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver' elad.wexler
@ 2013-09-28 18:54 ` richard -rw- weinberger
2013-09-28 22:14 ` Elad Wexler
0 siblings, 1 reply; 4+ messages in thread
From: richard -rw- weinberger @ 2013-09-28 18:54 UTC (permalink / raw)
To: elad.wexler; +Cc: Arnd Bergmann, Greg KH, LKML
On Sat, Sep 28, 2013 at 8:14 PM, <elad.wexler@gmail.com> wrote:
> From: Elad Wexler <elad.wexler@gmail.com>
>
> Driver doesn't do anything special in 'module_init'.
>
> 'module_platform_init' makes the code more readable.
>
> Signed-off-by: Elad Wexler <elad.wexler@gmail.com>
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.
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver'
2013-09-28 18:54 ` richard -rw- weinberger
@ 2013-09-28 22:14 ` Elad Wexler
2013-09-28 22:23 ` Richard Weinberger
0 siblings, 1 reply; 4+ messages in thread
From: Elad Wexler @ 2013-09-28 22:14 UTC (permalink / raw)
To: richard -rw- weinberger; +Cc: arnd, gregkh, linux-kernel, elad.wexler
On Sat, Sep 28, 2013 at 08:54:55PM +0200, richard -rw- weinberger wrote:
> On Sat, Sep 28, 2013 at 8:14 PM, <elad.wexler@gmail.com> wrote:
> > From: Elad Wexler <elad.wexler@gmail.com>
> >
> > Driver doesn't do anything special in 'module_init'.
> >
> > 'module_platform_init' makes the code more readable.
> >
> > Signed-off-by: Elad Wexler <elad.wexler@gmail.com>
>
> 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'
> --
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver'
2013-09-28 22:14 ` Elad Wexler
@ 2013-09-28 22:23 ` Richard Weinberger
0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2013-09-28 22:23 UTC (permalink / raw)
To: Elad Wexler; +Cc: arnd, gregkh, linux-kernel
Am 29.09.2013 00:14, schrieb Elad Wexler:
> On Sat, Sep 28, 2013 at 08:54:55PM +0200, richard -rw- weinberger wrote:
>> On Sat, Sep 28, 2013 at 8:14 PM, <elad.wexler@gmail.com> wrote:
>>> From: Elad Wexler <elad.wexler@gmail.com>
>>>
>>> Driver doesn't do anything special in 'module_init'.
>>>
>>> 'module_platform_init' makes the code more readable.
>>>
>>> Signed-off-by: Elad Wexler <elad.wexler@gmail.com>
>>
>> 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'
Usually if a driver does not implement the exit function it's because of hardware
limitations.
IOW, the alarm bell rings. ;-)
Thanks,
//richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-28 22:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-28 18:14 [PATCH] misc: cs5535-mfgpt: Replace 'module_init' with 'module_platform_driver' elad.wexler
2013-09-28 18:54 ` richard -rw- weinberger
2013-09-28 22:14 ` Elad Wexler
2013-09-28 22:23 ` Richard Weinberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.