Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4803321pxv; Tue, 20 Jul 2021 11:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywEZk+iYO2PtDGtm3EtJR5/Ztj5hrYUfrchJyU2c2LALv4lNRmCdSq9GSXH7CWmBagsGNv X-Received: by 2002:a17:906:4e15:: with SMTP id z21mr34584259eju.333.1626806956900; Tue, 20 Jul 2021 11:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626806956; cv=none; d=google.com; s=arc-20160816; b=BMipmNLUVpYq5OxJCSBxJmC6nitFV7gFVGmYICw6qQMXJtHwRF1eQKqWOOxtt99Ddw 5L7OJb2oWzvg8XDws9h6ogbDXKw0nrwq+shtKrFUIYBuCpwXCy/OFQ0aE9Spfe9P9rCB kwyH/lKoyAMwiT9r37XsJEPgdEMITFNGomOCEWwrpAO3nJfZCfPp6XPH1vIM5NqF8iYJ HRj7/Vq0//s+eOw8gqQ2u4hLB1/SY/ofsHj4paiAxVv8QgpFDE+8pPPFF44UVSGsSlQk HeXpNG7lernewdHzeglIreF6BhH6FvvNtD5F8xdFJiCByaLZ1lYxYt7giRlam1oIk5EX iecw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yQQlhWlnWDzir+EZ1IELmhN3SK/430MbNLumvaeYWLw=; b=i1AyaoHFcDsR948gi9pJ5F9O2/vmTNJfmXMpi3e5vGnACnzJJtf/aTz/gOhmz53kEN eIjwjhnXyiYky+fpC/tPbPgZa2nSNfmY3JKALDGtZ3LaVb2kyE43eNqXIzc7KOVxOmWC 4f7cFHSEAQGOVa2lUvSexyajnPxC75c5TW4Nk1zOyn7uDCepmMVB3kb7V2z7vPyL9Quh SSrRDViz3Kf6y67JGGXRf2AB+5Akq78SEG2g5jw4c7I9llcts3jXU2d28+iCCsIEMNQj VV7H2s9JNtpsDvVL6e+kaB4VxlQ8PYE9QgJEEq5O4U6ZztD6hQTlH34byjydbXWlxX9Q aPDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si23990300ejq.134.2021.07.20.11.48.53; Tue, 20 Jul 2021 11:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbhGTSGy (ORCPT + 99 others); Tue, 20 Jul 2021 14:06:54 -0400 Received: from mga05.intel.com ([192.55.52.43]:2800 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbhGTSGu (ORCPT ); Tue, 20 Jul 2021 14:06:50 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10051"; a="296869487" X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="296869487" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 11:47:28 -0700 X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="462146668" Received: from aremenni-mobl.amr.corp.intel.com (HELO [10.209.130.10]) ([10.209.130.10]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 11:47:25 -0700 Subject: Re: [PATCH v4 05/12] ASoC: amd: add ACP5x PCM platform driver To: Vijendar Mukunda , broonie@kernel.org, alsa-devel@alsa-project.org Cc: Sunil-kumar.Dommati@amd.com, open list , Takashi Iwai , Liam Girdwood , Alexander.Deucher@amd.com, krisman@collabora.com References: <20210720163732.23003-1-Vijendar.Mukunda@amd.com> <20210720163732.23003-6-Vijendar.Mukunda@amd.com> From: Pierre-Louis Bossart Message-ID: <106fa9e8-1d22-dd6a-8301-20761a212e4f@linux.intel.com> Date: Tue, 20 Jul 2021 13:12:55 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210720163732.23003-6-Vijendar.Mukunda@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +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? > + } > + > + 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; > +}