aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2018-05-18 07:54:44 -0700
committerTony Lindgren <tony@atomide.com>2018-05-18 07:54:44 -0700
commitc97c8620833e4a55ddb7a43961d3205184a487f0 (patch)
tree227de7ac91bee6fcbd37491541a326f946217978
parentdc4c85eac6bc8cfe25144936c5636aa1415bbc12 (diff)
downloadlinux-omap-omap-for-v4.18/ti-sysc.tar.gz
bus: ti-sysc: Fix optional clocks array accessomap-for-v4.18/ti-sysc-fix-signedomap-for-v4.18/ti-sysc
We should be checking ddata->clocks[i] instead of clock_names[i] for the optional clocks. Currently this just happens to work for the typical case of one fck and one optional clock. Fixes: 09dfe5810762 ("bus: ti-sysc: Add handling for clkctrl opt clocks") Cc: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--drivers/bus/ti-sysc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 9cd8cd8c436ed..1cc29629d2380 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -128,7 +128,7 @@ static int sysc_get_one_clock(struct sysc *ddata, const char *name)
if (index < 0) {
for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
- if (!clock_names[i]) {
+ if (!ddata->clocks[i]) {
index = i;
break;
}