diff options
author | Peng Fan | 2018-12-15 12:19:46 +0000 |
---|---|---|
committer | Stefano Babic | 2019-01-09 17:03:29 +0100 |
commit | 224f745247045262f9c4ca9e379be1002204e4ea (patch) | |
tree | 582aa0f18c99cbbe9e45d2d1c4252b3e9ab12889 | |
parent | d17b0bedbfcd24dea36eb66852e6f8b2d334f729 (diff) |
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]
static struct imx8_clks imx8_clk_names[] = {
^~~~~~~~~~~~~~
"
Fix with wrapping the array with CONFIG_CMD_CLK.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/clk/imx/clk-imx8.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c index fcb8090d357..d03fcc2fddb 100644 --- a/drivers/clk/imx/clk-imx8.c +++ b/drivers/clk/imx/clk-imx8.c @@ -18,6 +18,7 @@ struct imx8_clks { const char *name; }; +#if CONFIG_IS_ENABLED(CMD_CLK) static struct imx8_clks imx8_clk_names[] = { { IMX8QXP_A35_DIV, "A35_DIV" }, { IMX8QXP_I2C0_CLK, "I2C0" }, @@ -39,6 +40,7 @@ static struct imx8_clks imx8_clk_names[] = { { IMX8QXP_ENET1_REF_DIV, "ENET1_REF" }, { IMX8QXP_ENET1_PTP_CLK, "ENET1_PTP" }, }; +#endif static ulong imx8_clk_get_rate(struct clk *clk) { |