mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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: 1c099779c1
("clk: add BCM63XX gated clock controller driver")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://lore.kernel.org/r/20200609110846.4029620-1-noltari@gmail.com
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
b3a9e3b962
commit
cf8030d703
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue