clk: bcm63xx-gate: fix last clock availability
PATCH 1/1 clk: bcm63xx-gate: fix last clock availability
In order to make the last clock available, maxbit has to be set to the highest bit value plus 1.
Fixes 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver")
Signed-off-by Álvaro Fernández Rojas <[email protected]>
--- drivers/clk/bcm/clk-bcm63xx-gate.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/bcm/clk-bcm63xx-gate.c +1 -0
@@ -155,6 +155,7 @@ static int clk_bcm63xx_probe(struct platform_device *pdev)for (entry = table; entry->name; entry++) maxbit =max_t (u8, maxbit, entry->bit); + maxbit++; hw =devm_kzalloc (&pdev->dev,struct_size (hw, data.hws, maxbit),GFP_KERNEL );
Signature · 7 lines
2.26.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 5 lines · Álvaro Fernández Rojas
In order to make the last clock available, maxbit has to be set to the highest bit value plus 1.
Fixes 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver")Signed-off-by Álvaro Fernández Rojas <[email protected]>
Reviewed-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
Quoting Álvaro Fernández Rojas (2020-06-09 04:08:46)
Quoted 6 lines
In order to make the last clock available, maxbit has to be set to the highest bit value plus 1.
Fixes 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver")Signed-off-by Álvaro Fernández Rojas <[email protected]>---
Applied to clk-next
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel