diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2018-01-25 15:27:10 +0100 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2018-01-28 17:12:39 +0100 |
commit | 75b381aae8dd5fbc3c6b3f453dc3ca9ce3c94ab4 (patch) | |
tree | a1d5821776a9abd2920dbb1dbdbd99047039fea9 /drivers/clk/rockchip/clk_rk3288.c | |
parent | 64a12202ed113c4696c0f4b6c3d6a35d97383851 (diff) |
rockchip: clk: guard set_parent implementations against OF_PLATDATA
The set_parent implementations do not make sense when OF_PLATDATA is
enabled. We guard these against OF_PLATDATA and don't populate the
set_parent-op when this is the case.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers/clk/rockchip/clk_rk3288.c')
-rw-r--r-- | drivers/clk/rockchip/clk_rk3288.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c index baa8122bd6..552a71a82f 100644 --- a/drivers/clk/rockchip/clk_rk3288.c +++ b/drivers/clk/rockchip/clk_rk3288.c @@ -842,7 +842,7 @@ static ulong rk3288_clk_set_rate(struct clk *clk, ulong rate) return new_rate; } -static int rk3288_gmac_set_parent(struct clk *clk, struct clk *parent) +static int __maybe_unused rk3288_gmac_set_parent(struct clk *clk, struct clk *parent) { struct rk3288_clk_priv *priv = dev_get_priv(clk->dev); struct rk3288_cru *cru = priv->cru; @@ -880,7 +880,7 @@ static int rk3288_gmac_set_parent(struct clk *clk, struct clk *parent) return -EINVAL; } -static int rk3288_clk_set_parent(struct clk *clk, struct clk *parent) +static int __maybe_unused rk3288_clk_set_parent(struct clk *clk, struct clk *parent) { switch (clk->id) { case SCLK_MAC: @@ -896,7 +896,9 @@ static int rk3288_clk_set_parent(struct clk *clk, struct clk *parent) static struct clk_ops rk3288_clk_ops = { .get_rate = rk3288_clk_get_rate, .set_rate = rk3288_clk_set_rate, +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .set_parent = rk3288_clk_set_parent, +#endif }; static int rk3288_clk_ofdata_to_platdata(struct udevice *dev) |