power: wakelock: BUG if wakelock is taken very late

There has been handful of corner cases where a driver would call
wake_lock very late in the suspend sequence but the suspend proceeds
anyways and causes issues.

Add code to BUG if a driver grabs a wakelock after suspend_noirq callbacks
are called, this will aid in correct wakelock usage for new drivers and
give us callstacks for misbehaving drivers.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed