Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aeb2c121 authored by Chris Ruehl's avatar Chris Ruehl Committed by Greg Kroah-Hartman
Browse files

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: default avatarChris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9058bdc3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ 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;
	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;