From 2b8454a75b90d7cd1ac325a0baba77244733354f Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Wed, 27 Nov 2013 11:34:58 +0800 Subject: platform/chrome: unregister platform driver/device when module exit We have registered platform driver and device when module init, and need unregister them when module exit. Signed-off-by: Wei Yongjun Signed-off-by: Olof Johansson --- drivers/platform/chrome/chromeos_laptop.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/platform/chrome') diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 446ef0f9c256..7f3aad0e115c 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); -- cgit v1.2.1