The demand based switching responds to input events and schedules work items on all online cpus to increase the frequency. This will call the dbs_refresh_callback on respective cpu. If this work item kicks in while cpu1 is progressing its way through cpufreq_add_dev, there is a chance that work item grabs the cpu_policy_rwsem of cpu1 and relases that of cpu0, when add device is working through releas- ing lock of cpu1 and reaquiring that of cpu0. This is locking out cpu1 when it tries to come up online next time. The fix is hold the hot plug lock while processing refresh work items. CRs-Fixed: 362444 Change-Id: I57db7c7a9b58369bf059302896f3bf9eca2bc2bb Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>