Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1765dbcc authored by Jon Hunter's avatar Jon Hunter Committed by Samuel Ortiz
Browse files

mfd: twl-core: Fix kernel panic on boot



Commit 8a6aaa3 (mfd: twl-core: Collect global variables behind one
private structure (global)) removed the variable "inuse" that is used
to determine if the device has been initialised and now use the
twl_priv structure instead. This is causing the kernel to panic on
OMAP3+ devices using the twl driver, because we try to access the
twl_priv->ready member before checking if twl_priv is initialised. Fix
this and move this test to the beginning of the twl_i2c_read/write
function because twl_get_last_module() also uses the twl_priv structure.

Signed-off-by: default avatarJon Hunter <jon-hunter@ti.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 6ed8b040
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment