Skip to content

Commit

Permalink
platform/chrome: unregister platform driver/device when module exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Olof Johansson committed Nov 27, 2013
1 parent 6d3c1af commit 2b8454a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/platform/chrome/chromeos_laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2b8454a

Please sign in to comment.