lkml.org 
[lkml]   [2021]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 05/12] ASoC: amd: add ACP5x PCM platform driver
From
Date
On 7/20/21 11:42 PM, Pierre-Louis Bossart wrote:
>
>> +static int acp5x_audio_probe(struct platform_device *pdev)
>> +{
>> + struct resource *res;
>> + struct i2s_dev_data *adata;
>> + int status;
>> +
>> + if (!pdev->dev.platform_data) {
>> + dev_err(&pdev->dev, "platform_data not retrieved\n");
>> + return -ENODEV;
>> + }
>> + irqflags = *((unsigned int *)(pdev->dev.platform_data));
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>> + dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
>> + return -ENODEV;
>
> indentation is off?

Will fix it and post the new version.
>
>> + }
>> +
>> + adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
>> + if (!adata)
>> + return -ENOMEM;
>> +
>> + adata->acp5x_base = devm_ioremap(&pdev->dev, res->start,
>> + resource_size(res));
>> + if (!adata->acp5x_base)
>> + return -ENOMEM;
>> + dev_set_drvdata(&pdev->dev, adata);
>> + status = devm_snd_soc_register_component(&pdev->dev,
>> + &acp5x_i2s_component,
>> + NULL, 0);
>> + if (status)
>> + dev_err(&pdev->dev, "Fail to register acp i2s component\n");
>> +
>> + return status;
>> +}

\
 
 \ /
  Last update: 2021-07-21 00:56    [W:0.043 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site