hwmon/mpu3050: move disable/enable irq in early_suspend/resume to avoid deadlock.
BZ: 34000
When mpu_early_suspend() is called, it firstly calls mutex_lock(&mpu->lock).
then disable_irq(). If there is a mpu interrupt during this lock and
disable_irq, mpu interrupt handler mpu_isr() will be called.
In mpr_isr(), it will wait for mpu->lock, but in mpu_early_suspend(),
disable_irq() won't return untill mpr_isr end. Then a dead lock happens.
Change-Id: I83b339bf52ce74cffe9b43120a1047d1d9d6c4a5
Signed-off-by: Tang Guifang <guifang.tang@intel.com>
Reviewed-on: http://android.intel.com:8080/46669
Reviewed-by: Liu, Hong <hong.liu@intel.com>
Reviewed-by: Pan, Zhenjie <zhenjie.pan@intel.com>
Reviewed-by: Du, Alek <alek.du@intel.com>
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>