summaryrefslogtreecommitdiff
path: root/drivers/clk/clk-cs2000-cp.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-04-11 00:35:49 +0000
committerMichael Turquette <mturquette@baylibre.com>2017-04-12 18:54:48 +0200
commit83dd720da666a2af6debbb2d8aab289e3b6cb8f5 (patch)
treefab3a24e524a083efa6ea308558030ed76315be2 /drivers/clk/clk-cs2000-cp.c
parenta507c57dd1ddcb39a06856aed83b6c69b483aa6a (diff)
clk: cs2000: use existing priv_to_dev() to getting struct device
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Diffstat (limited to 'drivers/clk/clk-cs2000-cp.c')
-rw-r--r--drivers/clk/clk-cs2000-cp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c
index f5915ff1d397..4df38c5ff96c 100644
--- a/drivers/clk/clk-cs2000-cp.c
+++ b/drivers/clk/clk-cs2000-cp.c
@@ -370,8 +370,7 @@ static const struct clk_ops cs2000_ops = {
static int cs2000_clk_get(struct cs2000_priv *priv)
{
- struct i2c_client *client = priv_to_client(priv);
- struct device *dev = &client->dev;
+ struct device *dev = priv_to_dev(priv);
struct clk *clk_in, *ref_clk;
clk_in = devm_clk_get(dev, "clk_in");
@@ -439,8 +438,7 @@ static int cs2000_clk_register(struct cs2000_priv *priv)
static int cs2000_version_print(struct cs2000_priv *priv)
{
- struct i2c_client *client = priv_to_client(priv);
- struct device *dev = &client->dev;
+ struct device *dev = priv_to_dev(priv);
s32 val;
const char *revision;
@@ -471,7 +469,7 @@ static int cs2000_version_print(struct cs2000_priv *priv)
static int cs2000_remove(struct i2c_client *client)
{
struct cs2000_priv *priv = i2c_get_clientdata(client);
- struct device *dev = &client->dev;
+ struct device *dev = priv_to_dev(priv);
struct device_node *np = dev->of_node;
of_clk_del_provider(np);