From: Peng Donglin <dolinux.peng@gmail.com>
To: pierre-louis.bossart@linux.intel.com
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org,
Peng Donglin <dolinux.peng@gmail.com>
Subject: [PATCH v2 03/10] ASoC: Intel: Remove unnecessary function call
Date: Wed, 23 Aug 2017 05:19:07 -0700 [thread overview]
Message-ID: <63f080c9ef444ef32486914be97ed5f8c8c55d9f.1503484313.git.dolinux.peng@gmail.com> (raw)
In-Reply-To: <cover.1503484313.git.dolinux.peng@gmail.com>
The work of the function platform_set_drvdata is done by
devm_snd_soc_register_card.
Signed-off-by: Peng Donglin <dolinux.peng@gmail.com>
---
Changes in v2:
-add missed occurrences.
sound/soc/intel/boards/bytcht_da7213.c | 6 ++----
sound/soc/intel/boards/bytcht_es8316.c | 6 ++----
sound/soc/intel/boards/bytcht_nocodec.c | 6 ++----
sound/soc/intel/boards/bytcr_rt5640.c | 7 ++-----
sound/soc/intel/boards/bytcr_rt5651.c | 7 ++-----
sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++----
sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++----
sound/soc/intel/boards/cht_bsw_rt5672.c | 6 ++----
8 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c
index 18873e23f404..f43ced5288af 100644
--- a/sound/soc/intel/boards/bytcht_da7213.c
+++ b/sound/soc/intel/boards/bytcht_da7213.c
@@ -260,12 +260,10 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
}
ret_val = devm_snd_soc_register_card(&pdev->dev, card);
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev,
"snd_soc_register_card failed %d\n", ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, card);
+
return ret_val;
}
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 52635462dac6..c3213f320869 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -278,11 +278,9 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
}
ret = devm_snd_soc_register_card(&pdev->dev, &byt_cht_es8316_card);
- if (ret) {
+ if (ret)
dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret);
- return ret;
- }
- platform_set_drvdata(pdev, &byt_cht_es8316_card);
+
return ret;
}
diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c
index 1dd9441806fa..b9adde0e2a9f 100644
--- a/sound/soc/intel/boards/bytcht_nocodec.c
+++ b/sound/soc/intel/boards/bytcht_nocodec.c
@@ -185,12 +185,10 @@ static int snd_bytcht_nocodec_mc_probe(struct platform_device *pdev)
ret_val = devm_snd_soc_register_card(&pdev->dev, &bytcht_nocodec_card);
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n",
ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, &bytcht_nocodec_card);
+
return ret_val;
}
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 4a76b099a508..9a5775c89393 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -912,13 +912,10 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
}
ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card);
-
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n",
ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, &byt_rt5640_card);
+
return ret_val;
}
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 4a3516b38c2c..c50a3834d0eb 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -304,13 +304,10 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
byt_rt5651_card.dev = &pdev->dev;
ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5651_card);
-
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n",
ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, &byt_rt5651_card);
+
return ret_val;
}
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 20755ecc7f9e..62d45e0badc5 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -295,12 +295,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
snd_soc_card_cht.dev = &pdev->dev;
snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev,
"snd_soc_register_card failed %d\n", ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, &snd_soc_card_cht);
+
return ret_val;
}
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 5bcde01d15e6..511d4d9b24bf 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -694,12 +694,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, drv);
ret_val = devm_snd_soc_register_card(&pdev->dev, card);
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev,
"snd_soc_register_card failed %d\n", ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, card);
+
return ret_val;
}
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index bc2a52de06a3..656cef7da054 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -443,12 +443,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
/* register the soc card */
snd_soc_card_cht.dev = &pdev->dev;
ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
- if (ret_val) {
+ if (ret_val)
dev_err(&pdev->dev,
"snd_soc_register_card failed %d\n", ret_val);
- return ret_val;
- }
- platform_set_drvdata(pdev, &snd_soc_card_cht);
+
return ret_val;
}
--
2.14.1
next prev parent reply other threads:[~2017-08-23 12:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 12:17 [PATCH v2 00/10] Remove unnecessary function Peng Donglin
2017-08-23 12:17 ` [PATCH v2 01/10] ASoC: s3c24xx_uda134x: Remove unnecessary function call Peng Donglin
2017-08-24 10:39 ` Mark Brown
2017-08-23 12:18 ` [PATCH v2 02/10] ASoC: mediatek: " Peng Donglin
2017-08-24 10:40 ` Mark Brown
2017-08-23 12:19 ` Peng Donglin [this message]
2017-08-28 2:20 ` [PATCH v2 03/10] ASoC: Intel: " Donglin Peng
2017-08-29 18:29 ` Mark Brown
2017-08-23 12:19 ` [PATCH v2 04/10] ASoC: atmel: " Peng Donglin
2017-08-23 12:20 ` [PATCH v2 05/10] ASoC: rockchip: " Peng Donglin
2017-08-23 12:20 ` [PATCH v2 06/10] ASoC: mxs-sgtl5000: " Peng Donglin
2017-08-23 12:20 ` [PATCH v2 07/10] ASoC: qcom: Remove useless " Peng Donglin
2017-08-23 12:21 ` [PATCH v2 08/10] ASoC: sun4i-codec: Remove unnecessary " Peng Donglin
2017-08-23 12:21 ` [PATCH v2 09/10] ASoC: tegra: " Peng Donglin
2017-08-23 12:21 ` [PATCH v2 10/10] ASoC: ux500: " Peng Donglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63f080c9ef444ef32486914be97ed5f8c8c55d9f.1503484313.git.dolinux.peng@gmail.com \
--to=dolinux.peng@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®