[PORT FROM R2] pci.c: dont call msleep(0) in suspend flow
authorJean-Pierre Stierlin <jean-pierrex.stierlin@intel.com>
Thu, 16 Jun 2011 15:47:48 +0000 (17:47 +0200)
committerbuildbot <buildbot@intel.com>
Tue, 24 Jan 2012 12:19:22 +0000 (04:19 -0800)
commitb33376d7c8baa6355a101434e3101ecfa0c218d1
tree00ee4d6d4b4c3193b7e1c28ed966dc95b9156eb6
parent8a6b4d906c632a89573f7033c8eb113eaff298bf
[PORT FROM R2] pci.c: dont call msleep(0) in suspend flow

BZ: 2700

Gerrit patch #9116 was introduced to decrease the delay after changing
the device state. Unfortunately, msleep(0) will actually delay until the
next tick which is about 10ms on Medfield.

Solution: do not call msleep() if the requested delay is 0.
Added the same check before udelay(PCI_PM_D2_DELAY).

Change-Id: Ic07477be6c5f293f5007a1420a34d749571d04cd
Orig-Change-Id: Ifea81bdc31836dbbc26c4a7a6e6c5419dfb38f4e
Signed-off-by: Jean-Pierre Stierlin <jean-pierrex.stierlin@intel.com>
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Signed-off-by: Loic Martin <loicx.martin@intel.com>
Reviewed-on: http://android.intel.com:8080/32685
Reviewed-by: Mansoor, Illyas <illyas.mansoor@intel.com>
Reviewed-by: Yang, Fei <fei.yang@intel.com>
Reviewed-by: Kuppuswamy, Sathyanarayanan <sathyanarayanan.kuppuswamy@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/pci/pci.c