summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-03-27 11:43:01 (GMT)
committerPeter Chen <peter.chen@freescale.com>2015-04-08 06:32:00 (GMT)
commit0c4d6af42d8375e003f0e4626f2f661862b5df4b (patch)
treeda06d4595c2e0428296abe69126241d5e153ae62 /drivers/usb/chipidea
parent9b6567e19bc55187bc1bb094b00a9f63acb30071 (diff)
downloadlinux-0c4d6af42d8375e003f0e4626f2f661862b5df4b.tar.xz
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>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index 268e423..dfb05ed 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);