diff mbox series

[v1,1/4] ASoC: Intel: bytcht_es8316: Get platform data via dev_get_platdata()

Message ID 20211006150428.16434-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 2577b868a48ef3601116908738efbe570451e605
Headers show
Series [v1,1/4] ASoC: Intel: bytcht_es8316: Get platform data via dev_get_platdata() | expand

Commit Message

Andy Shevchenko Oct. 6, 2021, 3:04 p.m. UTC
Access to platform data via dev_get_platdata() getter to make code cleaner.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/boards/bytcht_es8316.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Pierre-Louis Bossart Oct. 6, 2021, 3:52 p.m. UTC | #1
On 10/6/21 10:04 AM, Andy Shevchenko wrote:
> Access to platform data via dev_get_platdata() getter to make code cleaner.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

For the series

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.com>

FWIW Marc likes a cover letter that's kept in the merge logs.

> ---
>  sound/soc/intel/boards/bytcht_es8316.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
> index 1bb9b8e7bcc7..4360519fbb0c 100644
> --- a/sound/soc/intel/boards/bytcht_es8316.c
> +++ b/sound/soc/intel/boards/bytcht_es8316.c
> @@ -456,12 +456,12 @@ static const struct dmi_system_id byt_cht_es8316_quirk_table[] = {
>  
>  static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
>  {
> +	struct device *dev = &pdev->dev;
>  	static const char * const mic_name[] = { "in1", "in2" };
> +	struct snd_soc_acpi_mach *mach = dev_get_platdata(dev);
>  	struct property_entry props[MAX_NO_PROPS] = {};
>  	struct byt_cht_es8316_private *priv;
>  	const struct dmi_system_id *dmi_id;
> -	struct device *dev = &pdev->dev;
> -	struct snd_soc_acpi_mach *mach;
>  	struct fwnode_handle *fwnode;
>  	const char *platform_name;
>  	struct acpi_device *adev;
> @@ -476,7 +476,6 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>  
> -	mach = dev->platform_data;
>  	/* fix index of codec dai */
>  	for (i = 0; i < ARRAY_SIZE(byt_cht_es8316_dais); i++) {
>  		if (!strcmp(byt_cht_es8316_dais[i].codecs->name,
>
Andy Shevchenko Oct. 6, 2021, 4:25 p.m. UTC | #2
On Wed, Oct 06, 2021 at 10:52:54AM -0500, Pierre-Louis Bossart wrote:
> On 10/6/21 10:04 AM, Andy Shevchenko wrote:
> > Access to platform data via dev_get_platdata() getter to make code cleaner.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> For the series
> 
> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.com>

Thanks!

> FWIW Marc likes a cover letter that's kept in the merge logs.

Noted!
Mark Brown Oct. 6, 2021, 4:25 p.m. UTC | #3
On Wed, Oct 06, 2021 at 10:52:54AM -0500, Pierre-Louis Bossart wrote:
> On 10/6/21 10:04 AM, Andy Shevchenko wrote:
> > Access to platform data via dev_get_platdata() getter to make code cleaner.

> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> For the series

> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.com>

> FWIW Marc likes a cover letter that's kept in the merge logs.

And for Mark it's more about the fact that it means that b4 can figure
out that any tags like Acked-by apply to all the patches in the series
instead of needing manual editing to add the tags.
Andy Shevchenko Oct. 7, 2021, 7:08 a.m. UTC | #4
On Wed, Oct 6, 2021 at 7:14 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> On 10/6/21 10:04 AM, Andy Shevchenko wrote:
> > Access to platform data via dev_get_platdata() getter to make code cleaner.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> For the series
>
> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.com>

Are you sure you gave the correct email here?
Pierre-Louis Bossart Oct. 7, 2021, 12:59 p.m. UTC | #5
On 10/7/21 2:08 AM, Andy Shevchenko wrote:
> On Wed, Oct 6, 2021 at 7:14 PM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
>> On 10/6/21 10:04 AM, Andy Shevchenko wrote:
>>> Access to platform data via dev_get_platdata() getter to make code cleaner.
>>>
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> For the series
>>
>> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.com>
> 
> Are you sure you gave the correct email here?

Thanks for catching this, I need a break obviously.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mark Brown Oct. 7, 2021, 9:37 p.m. UTC | #6
On Wed, 6 Oct 2021 18:04:25 +0300, Andy Shevchenko wrote:
> Access to platform data via dev_get_platdata() getter to make code cleaner.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: Intel: bytcht_es8316: Get platform data via dev_get_platdata()
      commit: 2577b868a48ef3601116908738efbe570451e605
[2/4] ASoC: Intel: bytcht_es8316: Use temporary variable for struct device
      commit: 6f32c521061b704c0198be3ba9834f5a64ea5605
[3/4] ASoC: Intel: bytcht_es8316: Switch to use gpiod_get_optional()
      commit: 10f4a96543b744c8cc7ef8b0799af21d911dd37d
[4/4] ASoC: Intel: bytcht_es8316: Utilize dev_err_probe() to avoid log saturation
      commit: c25d4546ca452b2e8c03bc735e4c65bc6dd751dd

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 1bb9b8e7bcc7..4360519fbb0c 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -456,12 +456,12 @@  static const struct dmi_system_id byt_cht_es8316_quirk_table[] = {
 
 static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	static const char * const mic_name[] = { "in1", "in2" };
+	struct snd_soc_acpi_mach *mach = dev_get_platdata(dev);
 	struct property_entry props[MAX_NO_PROPS] = {};
 	struct byt_cht_es8316_private *priv;
 	const struct dmi_system_id *dmi_id;
-	struct device *dev = &pdev->dev;
-	struct snd_soc_acpi_mach *mach;
 	struct fwnode_handle *fwnode;
 	const char *platform_name;
 	struct acpi_device *adev;
@@ -476,7 +476,6 @@  static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	mach = dev->platform_data;
 	/* fix index of codec dai */
 	for (i = 0; i < ARRAY_SIZE(byt_cht_es8316_dais); i++) {
 		if (!strcmp(byt_cht_es8316_dais[i].codecs->name,