diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-09-10 02:39:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-09-14 14:41:38 -0400 |
commit | 2719a752b6e96b22ac6a0d5b9397c21c93abcd0f (patch) | |
tree | 3d5e7fe3487d1d17a76fd384375a96aa0ae8a33e | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
ASoC: ak4642: use *dev on ak4642_i2c_probe()
Let's replace &i2c->dev to dev
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/ak4642.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 4a90143d0e90..9af06d30386b 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -584,7 +584,8 @@ static const struct of_device_id ak4642_of_match[]; | |||
584 | static int ak4642_i2c_probe(struct i2c_client *i2c, | 584 | static int ak4642_i2c_probe(struct i2c_client *i2c, |
585 | const struct i2c_device_id *id) | 585 | const struct i2c_device_id *id) |
586 | { | 586 | { |
587 | struct device_node *np = i2c->dev.of_node; | 587 | struct device *dev = &i2c->dev; |
588 | struct device_node *np = dev->of_node; | ||
588 | const struct ak4642_drvdata *drvdata = NULL; | 589 | const struct ak4642_drvdata *drvdata = NULL; |
589 | struct regmap *regmap; | 590 | struct regmap *regmap; |
590 | struct ak4642_priv *priv; | 591 | struct ak4642_priv *priv; |
@@ -592,7 +593,7 @@ static int ak4642_i2c_probe(struct i2c_client *i2c, | |||
592 | if (np) { | 593 | if (np) { |
593 | const struct of_device_id *of_id; | 594 | const struct of_device_id *of_id; |
594 | 595 | ||
595 | of_id = of_match_device(ak4642_of_match, &i2c->dev); | 596 | of_id = of_match_device(ak4642_of_match, dev); |
596 | if (of_id) | 597 | if (of_id) |
597 | drvdata = of_id->data; | 598 | drvdata = of_id->data; |
598 | } else { | 599 | } else { |
@@ -600,11 +601,11 @@ static int ak4642_i2c_probe(struct i2c_client *i2c, | |||
600 | } | 601 | } |
601 | 602 | ||
602 | if (!drvdata) { | 603 | if (!drvdata) { |
603 | dev_err(&i2c->dev, "Unknown device type\n"); | 604 | dev_err(dev, "Unknown device type\n"); |
604 | return -EINVAL; | 605 | return -EINVAL; |
605 | } | 606 | } |
606 | 607 | ||
607 | priv = devm_kzalloc(&i2c->dev, sizeof(*priv), GFP_KERNEL); | 608 | priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); |
608 | if (!priv) | 609 | if (!priv) |
609 | return -ENOMEM; | 610 | return -ENOMEM; |
610 | 611 | ||
@@ -616,7 +617,7 @@ static int ak4642_i2c_probe(struct i2c_client *i2c, | |||
616 | if (IS_ERR(regmap)) | 617 | if (IS_ERR(regmap)) |
617 | return PTR_ERR(regmap); | 618 | return PTR_ERR(regmap); |
618 | 619 | ||
619 | return snd_soc_register_codec(&i2c->dev, | 620 | return snd_soc_register_codec(dev, |
620 | &soc_codec_dev_ak4642, &ak4642_dai, 1); | 621 | &soc_codec_dev_ak4642, &ak4642_dai, 1); |
621 | } | 622 | } |
622 | 623 | ||