diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-21 19:36:59 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-21 19:36:59 +0100 |
| commit | dd7d99dc688d0fc448976f52f8517fbdeccdccda (patch) | |
| tree | 4ad59de5d584cf03e772ee153260c24ba0d717bd /drivers/bus/ti-sysc.c | |
| parent | 42bbdd99221bac206dde2b5e87098177fcd2a48e (diff) | |
| parent | def9d2780727cec3313ed3522d0123158d87224d (diff) | |
| download | linux-dd7d99dc688d0fc448976f52f8517fbdeccdccda.tar.gz linux-dd7d99dc688d0fc448976f52f8517fbdeccdccda.tar.bz2 linux-dd7d99dc688d0fc448976f52f8517fbdeccdccda.zip | |
Merge 5.5-rc7 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bus/ti-sysc.c')
| -rw-r--r-- | drivers/bus/ti-sysc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index f4d1597df0a2..ccb44fe790a7 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -343,6 +343,12 @@ static int sysc_get_clocks(struct sysc *ddata) return -EINVAL; } + /* Always add a slot for main clocks fck and ick even if unused */ + if (!nr_fck) + ddata->nr_clocks++; + if (!nr_ick) + ddata->nr_clocks++; + ddata->clocks = devm_kcalloc(ddata->dev, ddata->nr_clocks, sizeof(*ddata->clocks), GFP_KERNEL); @@ -421,7 +427,7 @@ static int sysc_enable_opt_clocks(struct sysc *ddata) struct clk *clock; int i, error; - if (!ddata->clocks) + if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1) return 0; for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) { @@ -455,7 +461,7 @@ static void sysc_disable_opt_clocks(struct sysc *ddata) struct clk *clock; int i; - if (!ddata->clocks) + if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1) return; for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) { |
