diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-23 21:03:39 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-24 19:42:42 +0000 |
commit | bb18f0976ef8db41f68b66623ce3b8a745adb0b8 (patch) | |
tree | b719e75a8d341c1406d68abd22d620a3eb69f45c /sound/soc/codecs/twl6040.c | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) | |
download | lwn-bb18f0976ef8db41f68b66623ce3b8a745adb0b8.tar.gz lwn-bb18f0976ef8db41f68b66623ce3b8a745adb0b8.zip |
ASoC: twl6040, fsl: use to_platform_device
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r-- | sound/soc/codecs/twl6040.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 4cad8929d262..bc3de2e844e6 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1097,8 +1097,7 @@ static int twl6040_probe(struct snd_soc_codec *codec) { struct twl6040_data *priv; struct twl6040 *twl6040 = dev_get_drvdata(codec->dev->parent); - struct platform_device *pdev = container_of(codec->dev, - struct platform_device, dev); + struct platform_device *pdev = to_platform_device(codec->dev); int ret = 0; priv = devm_kzalloc(codec->dev, sizeof(*priv), GFP_KERNEL); |