i2c-omap: Don't write IE state in unidle if 0
authorCory Maccarrone <darkstar6262@gmail.com>
Wed, 23 Dec 2009 01:06:13 +0000 (18:06 -0700)
committerBen Dooks <ben-linux@fluff.org>
Thu, 24 Dec 2009 01:26:06 +0000 (01:26 +0000)
commit07ac31f6f4cd558e53f6705dbe3033a7f0237eb8
tree745b42db8e2d97fb4e783a581ba846fd57432c81
parentac07fb4dc1908d300f50fa711982c9d750eb59f7
i2c-omap: Don't write IE state in unidle if 0

Commit ef871432... (i2c-omap: OMAP3: PM: (re)init for every transfer
to support off-mode) introduced a change which make the dev->iestate
contents be written to the OMAP_I2C_IE_REG every time omap_i2c_unidle
is called.  Previously, the state was only written if it wasn't equal
to zero.

In omap_i2c_probe, omap_i2c_unidle() is called prior to omap_i2c_init(),
in which case dev->iestate has not yet been initialized and will be set
to zero.  Having this value written to the registers causes deadlock
while booting.

As such, this change restores the original functionality.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
drivers/i2c/busses/i2c-omap.c