リビジョン | 224f745247045262f9c4ca9e379be1002204e4ea (tree) |
---|---|
日時 | 2019-01-10 01:03:29 |
作者 | Peng Fan <peng.fan@nxp....> |
コミッター | Stefano Babic |
clk: imx8: fix build warning
When build clk driver in spl, met the warning:
"
drivers/clk/imx/clk-imx8.c:21:25: warning: ‘imx8_clk_names’ defined but not used [-Wunused-variable]
"
Fix with wrapping the array with CONFIG_CMD_CLK.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
@@ -18,6 +18,7 @@ struct imx8_clks { | ||
18 | 18 | const char *name; |
19 | 19 | }; |
20 | 20 | |
21 | +#if CONFIG_IS_ENABLED(CMD_CLK) | |
21 | 22 | static struct imx8_clks imx8_clk_names[] = { |
22 | 23 | { IMX8QXP_A35_DIV, "A35_DIV" }, |
23 | 24 | { IMX8QXP_I2C0_CLK, "I2C0" }, |
@@ -39,6 +40,7 @@ static struct imx8_clks imx8_clk_names[] = { | ||
39 | 40 | { IMX8QXP_ENET1_REF_DIV, "ENET1_REF" }, |
40 | 41 | { IMX8QXP_ENET1_PTP_CLK, "ENET1_PTP" }, |
41 | 42 | }; |
43 | +#endif | |
42 | 44 | |
43 | 45 | static ulong imx8_clk_get_rate(struct clk *clk) |
44 | 46 | { |