linux/drivers/clk/qcom
Jerome Brunet 12a26c298d clk: divider: fix incorrect usage of container_of
divider_recalc_rate() is an helper function used by clock divider of
different types, so the structure containing the 'hw' pointer is not
always a 'struct clk_divider'

At the following line:
> div = _get_div(table, val, flags, divider->width);

in several cases, the value of 'divider->width' is garbage as the actual
structure behind this memory is not a 'struct clk_divider'

Fortunately, this width value is used by _get_val() only when
CLK_DIVIDER_MAX_AT_ZERO flag is set. This has never been the case so
far when the structure is not a 'struct clk_divider'. This is probably
why we did not notice this bug before

Fixes: afe76c8fd0 ("clk: allow a clk divider with max divisor when zero")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-12-28 15:16:04 -08:00
..
clk-alpha-pll.c clk: qcom: Add .is_enabled ops for clk-alpha-pll 2016-11-02 14:52:58 -07:00
clk-alpha-pll.h clk: qcom: Enable FSM mode for votable alpha PLLs 2016-11-01 18:39:17 -07:00
clk-branch.c clk: Convert __clk_get_name(hw->clk) to clk_hw_get_name(hw) 2015-08-24 16:49:12 -07:00
clk-branch.h clk: qcom: Add support for branches/gate clocks 2014-01-16 12:01:01 -08:00
clk-pll.c clk: qcom: Enable FSM mode for votable alpha PLLs 2016-11-01 18:39:17 -07:00
clk-pll.h clk: qcom: Add support for SR2 PLLs 2015-07-07 17:19:58 -07:00
clk-rcg2.c clk: qcom: Remove unused RCG ops 2017-11-01 23:43:42 -07:00
clk-rcg.c clk: qcom: Fix pre-divider usage for pixel RCG 2016-02-29 12:57:06 -08:00
clk-rcg.h clk: qcom: Remove unused RCG ops 2017-11-01 23:43:42 -07:00
clk-regmap-divider.c clk: divider: fix incorrect usage of container_of 2017-12-28 15:16:04 -08:00
clk-regmap-divider.h clk: qcom: Add support for regmap divider clocks 2015-01-27 11:49:00 -08:00
clk-regmap-mux.c clk: qcom: Add simple regmap based muxes 2015-01-27 11:49:09 -08:00
clk-regmap-mux.h clk: qcom: Add simple regmap based muxes 2015-01-27 11:49:09 -08:00
clk-regmap.c clk: qcom: Migrate to clk_hw based registration and OF APIs 2016-08-24 17:37:06 -07:00
clk-regmap.h clk: qcom: Migrate to clk_hw based registration and OF APIs 2016-08-24 17:37:06 -07:00
clk-rpm.c clk: qcom: Implement RPM clocks for MSM8660/APQ8060 2017-11-01 23:48:47 -07:00
clk-smd-rpm.c clk: qcom: clk-smd-rpm: add msm8996 rpmclks 2017-11-02 00:08:12 -07:00
common.c clk: qcom: common: fix legacy board-clock registration 2017-11-14 15:53:29 -08:00
common.h clk: qcom: Add rcg ops to return floor value closest to the requested rate 2016-11-23 11:00:05 -08:00
gcc-apq8084.c clk: qcom: Move all sdcc rcgs to use clk_rcg2_floor_ops 2016-11-23 11:00:06 -08:00
gcc-ipq806x.c clk: qcom: ipq806x: Fix board clk rates 2016-11-09 17:10:32 -08:00
gcc-ipq4019.c clk: qcom: ipq4019: Add the cpu clock frequency change notifier 2016-12-27 13:44:34 -08:00
gcc-ipq8074.c clk: qcom: Add ipq8074 Global Clock Controller support 2017-06-19 17:29:41 -07:00
gcc-mdm9615.c clk: mdm9615: Add EBI2 clock 2017-01-09 16:33:26 -08:00
gcc-msm8660.c clk: qcom: add EBI2 clocks to the MSM8660 GCC 2016-07-01 18:12:45 -07:00
gcc-msm8916.c clk: qcom: msm8916: Fix bimc gpu clock ops 2017-08-23 15:55:46 -07:00
gcc-msm8960.c clk: qcom: Remove CLK_IS_ROOT 2016-03-04 12:53:53 -08:00
gcc-msm8974.c clk: qcom: Move all sdcc rcgs to use clk_rcg2_floor_ops 2016-11-23 11:00:06 -08:00
gcc-msm8994.c clk: qcom: SDHCI enablement on Nexus 5X / 6P 2017-01-27 13:33:05 -08:00
gcc-msm8996.c clk: msm8996-gcc: add missing smmu clks 2017-08-23 16:07:18 -07:00
gdsc.c clk: qcom: gdsc: Fix handling of hw control enable/disable 2017-01-26 16:00:38 -08:00
gdsc.h clk: qcom: gdsc: Add support for gdscs with HW control 2016-11-23 16:41:15 -08:00
Kconfig clk: qcom: Add ipq8074 Global Clock Controller support 2017-06-19 17:29:41 -07:00
lcc-ipq806x.c clk: qcom: lcc-ipq806x: Fixup overriding val in regmap_read call 2016-11-01 17:44:09 -07:00
lcc-mdm9615.c clk: mdm9615: Add support for MDM9615 Clock Controllers 2016-08-15 15:51:21 -07:00
lcc-msm8960.c Revert "clk: qcom: Specify LE device endianness" 2016-02-12 14:24:24 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmcc-apq8084.c Revert "clk: qcom: Specify LE device endianness" 2016-02-12 14:24:24 -08:00
mmcc-msm8960.c clk: qcom: Remove CLK_IS_ROOT 2016-03-04 12:53:53 -08:00
mmcc-msm8974.c Merge branch 'clk-fixes' into clk-next 2016-02-18 19:17:29 -08:00
mmcc-msm8996.c clk: qcom: add parent for venus core0 and core1 gdsc's 2017-04-19 09:55:58 -07:00
reset.c clk: qcom: Make reset_control_ops const 2016-03-29 16:30:26 -07:00
reset.h clk: qcom: Make reset_control_ops const 2016-03-29 16:30:26 -07:00