]> 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)
commit7aa48a746a859d32b0c9e7ef81f66d3091fe5da1
tree77bf960be9ffac5d80c2e23bdb2bfb278579b74d
parentd0efdb8376e90437cd7ddc2ee0c3fa014feb03d7
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: e8a5985443a1 ("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