usb: chipidea: debug: add low power mode check before print registers

Since the required clock to access registers is gated off in low power mode,
add ci->in_lpm check before try to dump registers value.

Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
This commit is contained in:
Li Jun 2015-03-27 19:43:01 +08:00 committed by Peter Chen
parent 9b6567e19b
commit 0c4d6af42d

View file

@ -336,8 +336,8 @@ static int ci_registers_show(struct seq_file *s, void *unused)
struct ci_hdrc *ci = s->private;
u32 tmp_reg;
if (!ci)
return 0;
if (!ci || ci->in_lpm)
return -EPERM;
/* ------ Registers ----- */
tmp_reg = hw_read_intr_enable(ci);