]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle-haltpoll: do not set an owner to allow modunload
authorJoao Martins <joao.m.martins@oracle.com>
Sat, 7 Sep 2019 23:45:24 +0000 (00:45 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 Sep 2019 15:36:30 +0000 (17:36 +0200)
commitb5b31b58847ec96aa1942246b4bf77df066699a4
tree77bf960be9ffac5d80c2e23bdb2bfb278579b74d
parentf42dd3bf4437e020b6c40a31fa39f2c6e9e110d6
cpuidle-haltpoll: do not set an owner to allow modunload

cpuidle-haltpoll can be built as a module to allow optional late load.
Given we are setting @owner to THIS_MODULE, cpuidle will attempt to grab a
module reference every time a cpuidle_device is registered -- so
essentially all online cpus get a reference.

This prevents for the module to be unloaded later, which makes the
module_exit callback entirely unused. Thus remove the @owner and allow
module to be unloaded.

Fixes: fde42cd982ef ("add cpuidle-haltpoll driver")
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-haltpoll.c