* [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit
@ 2013-05-05 5:07 Wei Yongjun
2013-05-07 23:28 ` Andrew Morton
2013-05-08 18:01 ` Chris Metcalf
0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2013-05-05 5:07 UTC (permalink / raw)
To: a.zummo, akpm; +Cc: yongjun_wei, rtc-linux, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
We have registered platform device when module init, and
need unregister it when module exit.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/rtc/rtc-tile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c
index 249b653..fc3dee9 100644
--- a/drivers/rtc/rtc-tile.c
+++ b/drivers/rtc/rtc-tile.c
@@ -146,6 +146,7 @@ exit_driver_unregister:
*/
static void __exit tile_rtc_driver_exit(void)
{
+ platform_device_unregister(tile_rtc_platform_device);
platform_driver_unregister(&tile_rtc_platform_driver);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit
2013-05-05 5:07 [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit Wei Yongjun
@ 2013-05-07 23:28 ` Andrew Morton
2013-05-08 2:46 ` Wei Yongjun
2013-05-08 18:01 ` Chris Metcalf
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2013-05-07 23:28 UTC (permalink / raw)
To: Wei Yongjun; +Cc: a.zummo, yongjun_wei, rtc-linux, linux-kernel
On Sun, 5 May 2013 13:07:00 +0800 Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> We have registered platform device when module init, and
> need unregister it when module exit.
>
> ...
>
> --- a/drivers/rtc/rtc-tile.c
> +++ b/drivers/rtc/rtc-tile.c
> @@ -146,6 +146,7 @@ exit_driver_unregister:
> */
> static void __exit tile_rtc_driver_exit(void)
> {
> + platform_device_unregister(tile_rtc_platform_device);
> platform_driver_unregister(&tile_rtc_platform_driver);
> }
We don't need to do a platform_device_put(), as tile_rtc_driver_init()
does?
drivers/rtc/rtc-stmp3xxx.c appears to need the same fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit
2013-05-07 23:28 ` Andrew Morton
@ 2013-05-08 2:46 ` Wei Yongjun
0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2013-05-08 2:46 UTC (permalink / raw)
To: akpm; +Cc: a.zummo, yongjun_wei, rtc-linux, linux-kernel
On 05/08/2013 07:28 AM, Andrew Morton wrote:
> On Sun, 5 May 2013 13:07:00 +0800 Wei Yongjun <weiyj.lk@gmail.com> wrote:
>
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> We have registered platform device when module init, and
>> need unregister it when module exit.
>>
>> ...
>>
>> --- a/drivers/rtc/rtc-tile.c
>> +++ b/drivers/rtc/rtc-tile.c
>> @@ -146,6 +146,7 @@ exit_driver_unregister:
>> */
>> static void __exit tile_rtc_driver_exit(void)
>> {
>> + platform_device_unregister(tile_rtc_platform_device);
>> platform_driver_unregister(&tile_rtc_platform_driver);
>> }
> We don't need to do a platform_device_put(), as tile_rtc_driver_init()
> does?
platform_device_unregister() is a warp of platform_device_del() and
platform_device_put(), it is used after platform_device_add() success.
So extra platform_device_put() does not need.
> drivers/rtc/rtc-stmp3xxx.c appears to need the same fix.
Yes, you are right. I'll try to submit another patch to fix this unless
someone beats me at it.
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit
2013-05-05 5:07 [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit Wei Yongjun
2013-05-07 23:28 ` Andrew Morton
@ 2013-05-08 18:01 ` Chris Metcalf
1 sibling, 0 replies; 4+ messages in thread
From: Chris Metcalf @ 2013-05-08 18:01 UTC (permalink / raw)
To: Wei Yongjun; +Cc: a.zummo, akpm, yongjun_wei, rtc-linux, linux-kernel
On 5/5/2013 1:07 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> We have registered platform device when module init, and
> need unregister it when module exit.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/rtc/rtc-tile.c | 1 +
> 1 file changed, 1 insertion(+)
Thanks. Taken into the tile tree.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-08 18:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-05 5:07 [PATCH] rtc: rtc-tile: add missing platform_device_unregister() when module exit Wei Yongjun
2013-05-07 23:28 ` Andrew Morton
2013-05-08 2:46 ` Wei Yongjun
2013-05-08 18:01 ` Chris Metcalf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).