> -----Original Message-----
> From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-
> ow...@vger.kernel.org] On Behalf Of Chris Ruehl
> Sent: Friday, November 29, 2013 3:20 PM
> To: alexander.shish...@linux.intel.com; gre...@linuxfoundation.org
> Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Ruehl
> Subject: [PATCH 1/3 v2] usb: chipidea: Reallocate regmap only if lpm is
> detected
> 
> usb: chipidea: Reallocate regmap only if lpm is detected
> 
> The regmap only needs to reallocate if the hw_read on the CAP register
> shows
> lpm is used. Therefore the if() statement check the change.
> 
> Signed-off-by: Chris Ruehl <chris.ru...@gtsys.com.hk>
> ---
>  drivers/usb/chipidea/core.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 5d8981c..5075407 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -208,7 +208,8 @@ static int hw_device_init(struct ci_hdrc *ci, void
> __iomem *base)
>       reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) >>
>               __ffs(HCCPARAMS_LEN);
>       ci->hw_bank.lpm  = reg;
> -     hw_alloc_regmap(ci, !!reg);
> +     if (reg)
> +             hw_alloc_regmap(ci, !!reg);
>       ci->hw_bank.size = ci->hw_bank.op - ci->hw_bank.abs;
>       ci->hw_bank.size += OP_LAST;
>       ci->hw_bank.size /= sizeof(u32);
> --

Acked-by: Peter Chen <peter.c...@freescale.com>

Peter


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

Reply via email to