瀏覽代碼

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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Olof Johansson <olof@lixom.net>
Wei Yongjun 12 年之前
父節點
當前提交
2b8454a75b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/platform/chrome/chromeos_laptop.c

+ 3 - 0
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);