From: Li Jun Date: Fri, 27 Mar 2015 11:43:01 +0000 (+0800) Subject: usb: chipidea: debug: add low power mode check before print registers X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c4d6af42d8375e003f0e4626f2f661862b5df4b;p=linux-beck.git 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 Signed-off-by: Peter Chen --- diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 268e4236e84c..dfb05edcdb96 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c @@ -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);