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...@freescale.com>
---
 drivers/usb/chipidea/debug.c | 4 ++--
 1 file 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);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to