Blob Blame History Raw
From 2c72943dc359c9592747c3fd82cda30e7c89714c Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Tue, 14 Jan 2020 10:14:42 +0900
Subject: [PATCH] ASoC: rt715: use dev_to_sdw_dev() instead of to_sdw_slave_device()
Git-commit: 2c72943dc359c9592747c3fd82cda30e7c89714c
Patch-mainline: v5.6-rc1
References: jsc#SLE-16518

This patch fixup this error

  CC      sound/soc/codecs/rt715-sdw.o
Linux/sound/soc/codecs/rt715-sdw.c: In function 'rt715_dev_resume':
linux/sound/soc/codecs/rt715-sdw.c:568:28: error: implicit declaration\
 of function 'to_sdw_slave_device'; did you mean 'sdw_slave_modalias'?\
[-Werror=implicit-function-declaration]
  struct sdw_slave *slave = to_sdw_slave_device(dev);
                            ^~~~~~~~~~~~~~~~~~~
                            sdw_slave_modalias
linux/sound/soc/codecs/rt715-sdw.c:568:28: warning: initialization of\
 'struct sdw_slave *' from 'int' makes pointer from integer without a\
 cast [-Wint-conversion]
Cc1: some warnings being treated as errors

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h80yhm9p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 sound/soc/codecs/rt715-sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c
index c35591fd281b..18868e4ae6e8 100644
--- a/sound/soc/codecs/rt715-sdw.c
+++ b/sound/soc/codecs/rt715-sdw.c
@@ -565,7 +565,7 @@ static int rt715_dev_suspend(struct device *dev)
 
 static int rt715_dev_resume(struct device *dev)
 {
-	struct sdw_slave *slave = to_sdw_slave_device(dev);
+	struct sdw_slave *slave = dev_to_sdw_dev(dev);
 	struct rt715_priv *rt715 = dev_get_drvdata(dev);
 	unsigned long time;
 
-- 
2.16.4