* [PATCH -next] platform/chrome: unregister platform driver/device when module exit
@ 2013-11-27 3:34 Wei Yongjun
2013-11-27 4:24 ` Olof Johansson
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-11-27 3:34 UTC (permalink / raw)
To: olof; +Cc: yongjun_wei, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
We have registered platform driver and device when module
init, and need unregister them when module exit.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/platform/chrome/chromeos_laptop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 446ef0f..7f3aad0 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -511,6 +511,9 @@ static void __exit chromeos_laptop_exit(void)
i2c_unregister_device(tp);
if (ts)
i2c_unregister_device(ts);
+
+ platform_device_unregister(cros_platform_device);
+ platform_driver_unregister(&cros_platform_driver);
}
module_init(chromeos_laptop_init);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] platform/chrome: unregister platform driver/device when module exit
2013-11-27 3:34 [PATCH -next] platform/chrome: unregister platform driver/device when module exit Wei Yongjun
@ 2013-11-27 4:24 ` Olof Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2013-11-27 4:24 UTC (permalink / raw)
To: Wei Yongjun; +Cc: yongjun_wei, linux-kernel
On Wed, Nov 27, 2013 at 11:34:58AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> We have registered platform driver and device when module
> init, and need unregister them when module exit.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
Applied, thanks. I suppose it might make sense to move the i2c deregistration
to a remove function for the platform driver at some point, but this will do.
-Olof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-27 4:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 3:34 [PATCH -next] platform/chrome: unregister platform driver/device when module exit Wei Yongjun
2013-11-27 4:24 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox