From: Chen-Yu Tsai Date: Thu, 3 Jul 2014 14:55:42 +0000 (+0800) Subject: clk: sunxi: Fix gate indexing for sun6i-a31-apb0-gates X-Git-Tag: omap-for-v3.17/fixes-against-rc2~188^2~23^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd6eb534fbb8c9c52e6900f6b086d8c95f966449;p=pandora-kernel.git clk: sunxi: Fix gate indexing for sun6i-a31-apb0-gates sun6i-a31-apb0-gates supports using clock-indices for holes between individual gates. However, the driver passes the number of gates registered in clk_data->clk_num, which of_clk_src_onecell_get uses to recognize the range of valid indices a consumer can use. This patch makes the driver pass the maximum gate index + 1, so of_clk_src_onecell_get does not complain about indices greater than gates registered. This was tested on the A23 SoC, which has a similar APB0 clock, but has holes for gates to removed IP blocks. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard --- Reading git-diff-tree failed