* [PATCH] ASoC:zte:zx-tdm:remove redundant variables dev
@ 2020-03-11 14:46 ` tangbin
0 siblings, 0 replies; 2+ messages in thread
From: tangbin @ 2020-03-11 14:46 UTC (permalink / raw)
To: broonie, jun.nie, shawnguo
Cc: perex, tiwai, linux-arm-kernel, linux-kernel, tangbin
In this function, the variable 'dev' is assigned to '&pdev->dev',
but in the following code, all the assignments to 'struce device'
are used '&pdev->dev' instead of 'dev',except 'zx_tdm->dev'.
So,the variable 'dev' in this function is redundant and can be
replaced by '&pdev->dev' as elsewhere.
Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
---
sound/soc/zte/zx-tdm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/zte/zx-tdm.c b/sound/soc/zte/zx-tdm.c
index 0e5a05b25..4f787185d 100644
--- a/sound/soc/zte/zx-tdm.c
+++ b/sound/soc/zte/zx-tdm.c
@@ -371,7 +371,6 @@ static struct snd_soc_dai_driver zx_tdm_dai = {
static int zx_tdm_probe(struct platform_device *pdev)
{
- struct device *dev = &pdev->dev;
struct of_phandle_args out_args;
unsigned int dma_reg_offset;
struct zx_tdm_info *zx_tdm;
@@ -384,7 +383,7 @@ static int zx_tdm_probe(struct platform_device *pdev)
if (!zx_tdm)
return -ENOMEM;
- zx_tdm->dev = dev;
+ zx_tdm->dev = &pdev->dev;
zx_tdm->dai_wclk = devm_clk_get(&pdev->dev, "wclk");
if (IS_ERR(zx_tdm->dai_wclk)) {
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ASoC:zte:zx-tdm:remove redundant variables dev
@ 2020-03-11 14:46 ` tangbin
0 siblings, 0 replies; 2+ messages in thread
From: tangbin @ 2020-03-11 14:46 UTC (permalink / raw)
To: broonie, jun.nie, shawnguo
Cc: linux-kernel, tangbin, tiwai, linux-arm-kernel, perex
In this function, the variable 'dev' is assigned to '&pdev->dev',
but in the following code, all the assignments to 'struce device'
are used '&pdev->dev' instead of 'dev',except 'zx_tdm->dev'.
So,the variable 'dev' in this function is redundant and can be
replaced by '&pdev->dev' as elsewhere.
Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
---
sound/soc/zte/zx-tdm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/zte/zx-tdm.c b/sound/soc/zte/zx-tdm.c
index 0e5a05b25..4f787185d 100644
--- a/sound/soc/zte/zx-tdm.c
+++ b/sound/soc/zte/zx-tdm.c
@@ -371,7 +371,6 @@ static struct snd_soc_dai_driver zx_tdm_dai = {
static int zx_tdm_probe(struct platform_device *pdev)
{
- struct device *dev = &pdev->dev;
struct of_phandle_args out_args;
unsigned int dma_reg_offset;
struct zx_tdm_info *zx_tdm;
@@ -384,7 +383,7 @@ static int zx_tdm_probe(struct platform_device *pdev)
if (!zx_tdm)
return -ENOMEM;
- zx_tdm->dev = dev;
+ zx_tdm->dev = &pdev->dev;
zx_tdm->dai_wclk = devm_clk_get(&pdev->dev, "wclk");
if (IS_ERR(zx_tdm->dai_wclk)) {
--
2.20.1.windows.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-11 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 14:46 [PATCH] ASoC:zte:zx-tdm:remove redundant variables dev tangbin
2020-03-11 14:46 ` tangbin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.