From patchwork Wed Apr 10 11:06:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 320AE922 for ; Wed, 10 Apr 2019 11:08:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FCF52869B for ; Wed, 10 Apr 2019 11:08:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13C1A28A26; Wed, 10 Apr 2019 11:08:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5C9A42869B for ; Wed, 10 Apr 2019 11:08:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9B396872; Wed, 10 Apr 2019 13:07:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9B396872 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554894509; bh=DQ4sSQMOeJ9SNvCbst0LkTNByQ/QfdsTocX/7d2u0XQ=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tOxDfaCJGR+nBkVd9hV5f1oYN2Fgeam84d9UumNkMQjOzEogLEpkMFyWBry8Zu31V eLFyvMdNdplsUgT6QtIl8MMWLUifWnoL3mhcy0DbQrCxuW45X0shzjxK7SftjminO/ vJjWOsOdVq4tb24wo7py7ui7B/FJqWam3V8XFESc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A7FE1F89706; Wed, 10 Apr 2019 13:06:46 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20386F896DD; Wed, 10 Apr 2019 13:06:42 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30086.outbound.protection.outlook.com [40.107.3.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 242F4F89623 for ; Wed, 10 Apr 2019 13:06:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 242F4F89623 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PhJR6qae" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7k8MdTq2WZP8IZ9fXNE30HwJBwh33rYsVy6IBwalXDw=; b=PhJR6qae7qiUnVOVbd3tLSI0YqcqfuzqFhkLLmmij/aF/TWVjODOaI3yyuaBMMiYvIA8AXB5YAAG6RKFhoruT3YnpwFf+ZLiTsLzg1p28qHIjrtljeQ19cLFZCzWl0/E8SZRfMUykNacX+pde+2hsX8t5iZBmjqyuEcyY3qNwnk= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB4574.eurprd04.prod.outlook.com (20.177.55.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.19; Wed, 10 Apr 2019 11:06:36 +0000 Received: from VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888]) by VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888%3]) with mapi id 15.20.1792.009; Wed, 10 Apr 2019 11:06:36 +0000 From: Viorel Suman To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Rob Herring , Mark Rutland , Takashi Iwai , Shawn Guo , Sascha Hauer , Julia Lawall Thread-Topic: [PATCH v4 1/4] ASoC: fsl_audmix: remove "model" attribute Thread-Index: AQHU7412lUSxRWGu/U6VhmvGbfZpiw== Date: Wed, 10 Apr 2019 11:06:36 +0000 Message-ID: <1554894380-25153-2-git-send-email-viorel.suman@nxp.com> References: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0195.eurprd08.prod.outlook.com (2603:10a6:800:d2::25) To VI1PR04MB4704.eurprd04.prod.outlook.com (2603:10a6:803:52::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=viorel.suman@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 67bc11e6-0e67-403f-b1fc-08d6bda49918 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB4574; x-ms-traffictypediagnostic: VI1PR04MB4574: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39860400002)(376002)(136003)(346002)(189003)(199004)(386003)(6486002)(71190400001)(6506007)(97736004)(486006)(256004)(186003)(7416002)(26005)(102836004)(2616005)(446003)(36756003)(99286004)(476003)(44832011)(68736007)(110136005)(86362001)(316002)(71200400001)(11346002)(54906003)(66066001)(53936002)(508600001)(3846002)(106356001)(6116002)(105586002)(2906002)(6436002)(8936002)(50226002)(81166006)(5660300002)(7736002)(305945005)(6512007)(8676002)(4326008)(81156014)(14454004)(76176011)(52116002)(25786009)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4574; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: CVZa/UrLzdQNPgxLtDsR6ww+yIl9eg6Qen1q0oaoh8+OsgmhNZCh4apYfgPFpO6xto2hf2xNnhHiH8GZhNW6AowVGYyVUeaOeNMjPlR0EEsXEcYbXoMhVEn9/4Rn1BCe2Z/nzViEJ64cL5uSYKvZAv68Fsypxemd/z0ZrbkGen+5zNe2mLApVTNW/2g/MzGGdJOiFsoG967DT/axEN7/E4JOKQn1O1HgVgem2+vyGqk6AocpubrGfZ8v6jqx73N4JZjMbhnlATURaNKcUi9RQA97RxtGC6YiYbny58E8GTdUBdFIYj1DNMoVKVl7Y3Z0dH/qGItS0P2BuUlbf17aWBta3xJgd7urFOi9zqtZeVEuuS7kKsLNFDEnKOyNRHJ8vzdPejTeS25ijlOnu/NHP4PnwkrK7A23R3SvwMsIsP4= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67bc11e6-0e67-403f-b1fc-08d6bda49918 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:06:36.3279 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4574 Cc: "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , Viorel Suman , "linux-kernel@vger.kernel.org" , Viorel Suman , dl-linux-imx , Pengutronix Kernel Team , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH v4 1/4] ASoC: fsl_audmix: remove "model" attribute X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use "of_device_id.data" to specify the machine driver instead of "model" DTS attribute. Signed-off-by: Viorel Suman Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_audmix.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index dabde03..dc802d5 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -445,13 +445,29 @@ static const struct regmap_config fsl_audmix_regmap_config = { .cache_type = REGCACHE_FLAT, }; +static const struct of_device_id fsl_audmix_ids[] = { + { + .compatible = "fsl,imx8qm-audmix", + .data = "imx-audmix", + }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, fsl_audmix_ids); + static int fsl_audmix_probe(struct platform_device *pdev) { struct fsl_audmix *priv; struct resource *res; + const char *mdrv; + const struct of_device_id *of_id; void __iomem *regs; int ret; - const char *sprop; + + of_id = of_match_device(fsl_audmix_ids, &pdev->dev); + if (!of_id || !of_id->data) + return -EINVAL; + + mdrv = of_id->data; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -487,19 +503,12 @@ static int fsl_audmix_probe(struct platform_device *pdev) return ret; } - sprop = of_get_property(pdev->dev.of_node, "model", NULL); - if (sprop) { - priv->pdev = platform_device_register_data(&pdev->dev, sprop, 0, - NULL, 0); - if (IS_ERR(priv->pdev)) { - ret = PTR_ERR(priv->pdev); - dev_err(&pdev->dev, - "failed to register platform %s: %d\n", sprop, - ret); - } - } else { - dev_err(&pdev->dev, "[model] attribute missing.\n"); - ret = -EINVAL; + priv->pdev = platform_device_register_data(&pdev->dev, mdrv, 0, NULL, + 0); + if (IS_ERR(priv->pdev)) { + ret = PTR_ERR(priv->pdev); + dev_err(&pdev->dev, "failed to register platform %s: %d\n", + mdrv, ret); } return ret; @@ -553,12 +562,6 @@ static const struct dev_pm_ops fsl_audmix_pm = { pm_runtime_force_resume) }; -static const struct of_device_id fsl_audmix_ids[] = { - { .compatible = "fsl,imx8qm-audmix", }, - { /* sentinel */ } -}; -MODULE_DEVICE_TABLE(of, fsl_audmix_ids); - static struct platform_driver fsl_audmix_driver = { .probe = fsl_audmix_probe, .remove = fsl_audmix_remove, From patchwork Wed Apr 10 11:06:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D0C3922 for ; Wed, 10 Apr 2019 11:09:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50D4628A24 for ; Wed, 10 Apr 2019 11:09:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4497228A27; Wed, 10 Apr 2019 11:09:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F88028A24 for ; Wed, 10 Apr 2019 11:09:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C0A2987E; Wed, 10 Apr 2019 13:08:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C0A2987E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554894555; bh=8yLVx33QjtYvqvu9YtzVpq/GIUepmhYgdHq+nNswrkc=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jT+awFTngMn0WIBkr1MEyheAM4cvUenM2FDk0y3ikiTspm8FAvHOwgE7PC+wc6ll0 4U+jS5XDXcWSe1ijjvWhZ58+HQ9QBuZ97sP4G7zJQYEx/M8E2jzfJ0DnVKkxLX43fx 11v4ii+2t7Y7Da/bmKq/cdFjnprSPzXo4sNZHwe8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 00632F8971C; Wed, 10 Apr 2019 13:06:48 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 60ABAF89616; Wed, 10 Apr 2019 13:06:43 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30086.outbound.protection.outlook.com [40.107.3.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 59A5AF89616 for ; Wed, 10 Apr 2019 13:06:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59A5AF89616 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="t8PTsUFI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/zOxnLb7coYmHvJlVjsPNoRqqLujhbxECBBxoz38kCc=; b=t8PTsUFILCH6iFGDltbd4RGBDP8zEo/N/Tu4riGAdd3CW4OCbkYOP7KExJe1OI68Vgjw/Y0YIOxV9ODuYyrv/B/BSDC/DJMeqFk/Bk2kHxNRUFduim7rhcd/AgCXtTZfh0+YlFAGanC7ZIP2frUjnv9HZQGAunkSFx0gfodY4TM= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB4574.eurprd04.prod.outlook.com (20.177.55.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.19; Wed, 10 Apr 2019 11:06:37 +0000 Received: from VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888]) by VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888%3]) with mapi id 15.20.1792.009; Wed, 10 Apr 2019 11:06:37 +0000 From: Viorel Suman To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Rob Herring , Mark Rutland , Takashi Iwai , Shawn Guo , Sascha Hauer , Julia Lawall Thread-Topic: [PATCH v4 2/4] ASoC: fsl_audmix: remove "model" attribute from DT document Thread-Index: AQHU7413eRhwBaARkkWbCMXxs9Abbg== Date: Wed, 10 Apr 2019 11:06:37 +0000 Message-ID: <1554894380-25153-3-git-send-email-viorel.suman@nxp.com> References: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0195.eurprd08.prod.outlook.com (2603:10a6:800:d2::25) To VI1PR04MB4704.eurprd04.prod.outlook.com (2603:10a6:803:52::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=viorel.suman@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f79ea07a-f6aa-46bb-7577-08d6bda499c0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB4574; x-ms-traffictypediagnostic: VI1PR04MB4574: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39860400002)(376002)(136003)(346002)(189003)(199004)(386003)(6486002)(71190400001)(6506007)(97736004)(486006)(256004)(186003)(7416002)(26005)(102836004)(2616005)(446003)(36756003)(99286004)(476003)(44832011)(68736007)(110136005)(86362001)(316002)(71200400001)(11346002)(54906003)(66066001)(53936002)(508600001)(3846002)(106356001)(6116002)(105586002)(2906002)(6436002)(8936002)(50226002)(81166006)(5660300002)(7736002)(305945005)(6512007)(8676002)(4326008)(81156014)(14454004)(76176011)(52116002)(25786009)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4574; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: EYXj5uos6PAtmeXIFBazsbTNtmbjYskTqVEnwMWVkfIivDErfhy/Yj/ZtImua5aglpXm0FSxxR5UC5iPUF81qlH3ZD1dd9rUvOGKkAPwkbWU8lgiPlTBlEPLfDaVppmudroxprdHfugg9pJrGy1weJnhgDAcmj5pKfD0SW7aEm9E2ZafLkWTiO29+oHGH6LKc+H0JeEMwZxZK5jtzd/uFiirbhu+v/6k1zKAGm70O1NGbUbgItIicUYgV+8iUyNMgtx/cnfsrHLcs1Pl47Xhixhyl58wBnR1Gm+YSIaK/KPjPtRgG5mEArq03AzRwDawFGfS1LoP+EzqOaBcebUKTfHgTIGAgU1LWI7N6WU/grKdjLzGDG8+0tflafj4kaacf+rm29ugHpAZSYEitY85yeTWvEDIpUCrta9iBToE2SE= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f79ea07a-f6aa-46bb-7577-08d6bda499c0 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:06:37.4239 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4574 Cc: "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , Viorel Suman , "linux-kernel@vger.kernel.org" , Viorel Suman , dl-linux-imx , Pengutronix Kernel Team , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH v4 2/4] ASoC: fsl_audmix: remove "model" attribute from DT document X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove "model" attribute from fsl_audmix DT document. Signed-off-by: Viorel Suman Acked-by: Nicolin Chen --- Documentation/devicetree/bindings/sound/fsl,audmix.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/fsl,audmix.txt b/Documentation/devicetree/bindings/sound/fsl,audmix.txt index 45f807e..840b7e0 100644 --- a/Documentation/devicetree/bindings/sound/fsl,audmix.txt +++ b/Documentation/devicetree/bindings/sound/fsl,audmix.txt @@ -38,9 +38,6 @@ Device driver required properties: to SAI interfaces to be provided, the first SAI in the list being used to route the AUDMIX output. - - model : Must contain machine driver name which will configure - and instantiate the appropriate audio card. - Device driver configuration example: ====================================== audmix: audmix@59840000 { @@ -50,5 +47,4 @@ Device driver configuration example: clock-names = "ipg"; power-domains = <&pd_audmix>; dais = <&sai4>, <&sai5>; - model = "imx-audmix"; }; From patchwork Wed Apr 10 11:06:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C1BE17E6 for ; Wed, 10 Apr 2019 11:10:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1782C286A7 for ; Wed, 10 Apr 2019 11:10:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 087B228A26; Wed, 10 Apr 2019 11:10:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 369A5286A7 for ; Wed, 10 Apr 2019 11:10:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 65C59872; Wed, 10 Apr 2019 13:09:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 65C59872 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554894606; bh=bqtNHBdGb+DDVi6sUc6QC5Wm+IwtX7BLsoZyf8rNYFc=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HD3nA+6u0rPGT4rKFwNFGMuSdE3GZWmEvvnd5Fo6prZKIopmfRUOvH7UYdJXhx/aE rop8/AGyEdCeGxe7T4hu7fzM9aLAQIuOv99UJX1vVhhIlR9BB2BhsS00oNtIMigbJK pvfbwidltPNKz0/ztlA4Hi7a9ZhR7dK++y+3mLg0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4628BF89726; Wed, 10 Apr 2019 13:06:50 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 23789F89712; Wed, 10 Apr 2019 13:06:46 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30086.outbound.protection.outlook.com [40.107.3.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9180AF89623 for ; Wed, 10 Apr 2019 13:06:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9180AF89623 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="J4kNVVSU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KHLfWL99Jd3f9+2McXqmoZGFc8zxEJqeCXM0AEjHsyo=; b=J4kNVVSUgaln6Di5NpOD6Pa/IUA8xRVa632etEOZZ19BOu60ykZsiX3MOxmvDF8oITBzzymmwFs853G6rQl8Y6jsC/+2yf/InLoM6FPJYnivNEEEEhBMjxLW8sOHzjdFVhmd5W/KrTyQTXYLN0d32Bs6wK73o0u434LLAlrWKyI= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB4574.eurprd04.prod.outlook.com (20.177.55.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.19; Wed, 10 Apr 2019 11:06:38 +0000 Received: from VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888]) by VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888%3]) with mapi id 15.20.1792.009; Wed, 10 Apr 2019 11:06:38 +0000 From: Viorel Suman To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Rob Herring , Mark Rutland , Takashi Iwai , Shawn Guo , Sascha Hauer , Julia Lawall Thread-Topic: [PATCH v4 3/4] ASoC: imx-audmix: fix object reference leaks in probe Thread-Index: AQHU7414U4tCKylB806qOnpvZ9iI5A== Date: Wed, 10 Apr 2019 11:06:38 +0000 Message-ID: <1554894380-25153-4-git-send-email-viorel.suman@nxp.com> References: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0195.eurprd08.prod.outlook.com (2603:10a6:800:d2::25) To VI1PR04MB4704.eurprd04.prod.outlook.com (2603:10a6:803:52::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=viorel.suman@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5e4df8a6-ceb5-48b5-5b5f-08d6bda49a67 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB4574; x-ms-traffictypediagnostic: VI1PR04MB4574: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39860400002)(376002)(136003)(346002)(189003)(199004)(386003)(6486002)(71190400001)(6506007)(97736004)(486006)(256004)(186003)(7416002)(26005)(102836004)(2616005)(446003)(36756003)(99286004)(476003)(44832011)(68736007)(110136005)(86362001)(316002)(71200400001)(11346002)(54906003)(66066001)(53936002)(508600001)(3846002)(106356001)(6116002)(105586002)(2906002)(6436002)(8936002)(50226002)(81166006)(5660300002)(7736002)(305945005)(6512007)(8676002)(4326008)(81156014)(14454004)(76176011)(52116002)(25786009)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4574; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: NK8l+2oGBzuZHOtCeAKuM5em8bya6XJKDtlxOU9LbGrVnslZcSeTRmLE0g5YUx63G4z07+MWEQIcYhbodOwkV7fLYpwKnKZBRpXeL93GR+IgUU1LwIKgPNtFiWQLquayS2d0skX2Q3amd4Rx1VqYQGiEVl9/E3RIwBukAi3S8PkYS5vYEg6FmHb3Z3prbqxP2eioOaIaY9SMpkm0bDXl0ha7tlevBCbjaQ9I3V2TFuACC8/aVNTrT7DrdsRwFzzAaqKdNuIr79VkhpxZzGPfpQeV2LD/Z6GfBIPcmZRV7mBCL90sCq/1r2mPOS4LB2TaP1y3aVwXO78TL9k/ADYlySHNnwVh293PabuvQcyCbt3axZv0OcVoRshbGUxvRTfey2BdAsopF4x3GNHeDqHKgKdjjhe2LypdTRethPzWsSE= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e4df8a6-ceb5-48b5-5b5f-08d6bda49a67 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:06:38.5076 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4574 Cc: "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , Viorel Suman , "linux-kernel@vger.kernel.org" , Viorel Suman , dl-linux-imx , Pengutronix Kernel Team , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH v4 3/4] ASoC: imx-audmix: fix object reference leaks in probe X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Release the reference to the underlying device taken by of_find_device_by_node() call. Signed-off-by: Viorel Suman Reported-by: Julia Lawall Acked-by: Nicolin Chen --- sound/soc/fsl/imx-audmix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 7983bd3..9aaf3e5 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -171,6 +171,7 @@ static int imx_audmix_probe(struct platform_device *pdev) np->full_name); return -EINVAL; } + put_device(&audmix_pdev->dev); num_dai = of_count_phandle_with_args(audmix_np, "dais", NULL); if (num_dai != FSL_AUDMIX_MAX_DAIS) { @@ -216,6 +217,7 @@ static int imx_audmix_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to find SAI platform device\n"); return -EINVAL; } + put_device(&cpu_pdev->dev); dai_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s%s", fe_name_pref, args.np->full_name + 1); @@ -280,6 +282,8 @@ static int imx_audmix_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to find SAI platform device\n"); return -EINVAL; } + put_device(&cpu_pdev->dev); + priv->cpu_mclk = devm_clk_get(&cpu_pdev->dev, "mclk1"); if (IS_ERR(priv->cpu_mclk)) { ret = PTR_ERR(priv->cpu_mclk); From patchwork Wed Apr 10 11:06:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4854C17E6 for ; Wed, 10 Apr 2019 11:10:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C761286A7 for ; Wed, 10 Apr 2019 11:10:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FCB728A27; Wed, 10 Apr 2019 11:10:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6638C28A26 for ; Wed, 10 Apr 2019 11:10:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8A24A892; Wed, 10 Apr 2019 13:09:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A24A892 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554894643; bh=oQ/I8OwyraiCJJ0iQ7OfDgGVd2xWn7dpsiTrFlHKgJY=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P3AIgdgG9pp42BS68HxhLEIBwmD1kjRcFEaJ//3FqE+7s0wLGZsOXZtoL4rO/Fo3T ZfWoaaXO+2V+QORCTJIgwLR9sIqKMyl0igs62Nsot222vNEzCYh1psrJ0zyvP6QW7l 9+EYqr9FeMI2BxHOc/OoGp3SSbO/45gQlEjhQSXg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0EE1AF8972B; Wed, 10 Apr 2019 13:06:52 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5C52EF8971C; Wed, 10 Apr 2019 13:06:47 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30086.outbound.protection.outlook.com [40.107.3.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CCA5CF896DB for ; Wed, 10 Apr 2019 13:06:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CCA5CF896DB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="BFOcKG90" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MctxggZmkPyOkmKAopS44v+JsLNR5zfdO1ZR7z9v8Bk=; b=BFOcKG90QsGdCuYcKRc4CILBIaklP/j3DtlOIvODgSq92HDzg3gIHP7AL/sQXipoH5pVva38zA9Kf0axRj/XH9A//L8yuXBhU/Dmu7NduAmdmk8EwTKwrXd0q3AIpCvqmUWkc5Yzr7jsZMBIwEuYBzP5/GOCp0+HiKKsc1Pdi0g= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB4574.eurprd04.prod.outlook.com (20.177.55.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.19; Wed, 10 Apr 2019 11:06:41 +0000 Received: from VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888]) by VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::2594:3cf0:20a2:8888%3]) with mapi id 15.20.1792.009; Wed, 10 Apr 2019 11:06:41 +0000 From: Viorel Suman To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Rob Herring , Mark Rutland , Takashi Iwai , Shawn Guo , Sascha Hauer , Julia Lawall Thread-Topic: [PATCH v4 4/4] ASoC: fsl_audmix: cache pdev->dev pointer Thread-Index: AQHU7414DWXUsXvcU0yn6Om9tlbh3g== Date: Wed, 10 Apr 2019 11:06:39 +0000 Message-ID: <1554894380-25153-5-git-send-email-viorel.suman@nxp.com> References: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554894380-25153-1-git-send-email-viorel.suman@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0195.eurprd08.prod.outlook.com (2603:10a6:800:d2::25) To VI1PR04MB4704.eurprd04.prod.outlook.com (2603:10a6:803:52::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=viorel.suman@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0f8e7cad-75cb-4c01-7dad-08d6bda49b0d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB4574; x-ms-traffictypediagnostic: VI1PR04MB4574: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39860400002)(376002)(136003)(346002)(189003)(199004)(386003)(6486002)(71190400001)(6506007)(97736004)(486006)(256004)(186003)(7416002)(26005)(102836004)(2616005)(446003)(36756003)(99286004)(476003)(44832011)(68736007)(110136005)(86362001)(316002)(71200400001)(11346002)(54906003)(66066001)(53936002)(508600001)(3846002)(106356001)(6116002)(105586002)(2906002)(6436002)(8936002)(50226002)(81166006)(5660300002)(7736002)(305945005)(6512007)(8676002)(4326008)(81156014)(14454004)(76176011)(52116002)(25786009)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4574; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: pjByZJ1N845TVwzkeqyxHn+z0+BdHCaIkK5lp0ya07YyKYmoP/4p7+JLhLnLL7nIiWlAOrdmUv3cXwuzupanuukOJ2LGC39qO5PArnl2njYCXnjbkTYgWAO7FsfwKxB7Od6W9aGCP3WjDt8QhOBlLrwRSzZfPbAUNQeEMC+dtDVSUzKaRAWXXjbbQh1ICM05zmFeEjDIb27gQ6PyiJFHWSNEKrMLyUEkNJJAR3EMYP6G0H1DSfKtp9LPROcgXlOcI3aFZCajCCCRNihkcaAel2He0Yk6BeKdWS8dUsito9kZCuQ8b2CaVGqyHp/4/9+28M+zfcYEuOwvqBYeQySDXkRQPMW0FPC1xz2dySMa+P3G0y6Lkz+uI+flppvvfxqUN0p5qFfwDQYQZCkk5UeS+XyuRlDjeGUBS5SyQV+CBPs= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f8e7cad-75cb-4c01-7dad-08d6bda49b0d X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:06:39.5894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4574 Cc: "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , Viorel Suman , "linux-kernel@vger.kernel.org" , Viorel Suman , dl-linux-imx , Pengutronix Kernel Team , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH v4 4/4] ASoC: fsl_audmix: cache pdev->dev pointer X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP There should be no trouble to understand dev = pdev->dev. This can save some space to have more print info or save some wrapped lines. Signed-off-by: Viorel Suman Suggested-by: Nicolin Chen --- sound/soc/fsl/fsl_audmix.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index dc802d5..3897a54 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -456,6 +456,7 @@ MODULE_DEVICE_TABLE(of, fsl_audmix_ids); static int fsl_audmix_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct fsl_audmix *priv; struct resource *res; const char *mdrv; @@ -463,52 +464,50 @@ static int fsl_audmix_probe(struct platform_device *pdev) void __iomem *regs; int ret; - of_id = of_match_device(fsl_audmix_ids, &pdev->dev); + of_id = of_match_device(fsl_audmix_ids, dev); if (!of_id || !of_id->data) return -EINVAL; mdrv = of_id->data; - priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; /* Get the addresses */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_ioremap_resource(dev, res); if (IS_ERR(regs)) return PTR_ERR(regs); - priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "ipg", regs, + priv->regmap = devm_regmap_init_mmio_clk(dev, "ipg", regs, &fsl_audmix_regmap_config); if (IS_ERR(priv->regmap)) { - dev_err(&pdev->dev, "failed to init regmap\n"); + dev_err(dev, "failed to init regmap\n"); return PTR_ERR(priv->regmap); } - priv->ipg_clk = devm_clk_get(&pdev->dev, "ipg"); + priv->ipg_clk = devm_clk_get(dev, "ipg"); if (IS_ERR(priv->ipg_clk)) { - dev_err(&pdev->dev, "failed to get ipg clock\n"); + dev_err(dev, "failed to get ipg clock\n"); return PTR_ERR(priv->ipg_clk); } platform_set_drvdata(pdev, priv); - pm_runtime_enable(&pdev->dev); + pm_runtime_enable(dev); - ret = devm_snd_soc_register_component(&pdev->dev, &fsl_audmix_component, + ret = devm_snd_soc_register_component(dev, &fsl_audmix_component, fsl_audmix_dai, ARRAY_SIZE(fsl_audmix_dai)); if (ret) { - dev_err(&pdev->dev, "failed to register ASoC DAI\n"); + dev_err(dev, "failed to register ASoC DAI\n"); return ret; } - priv->pdev = platform_device_register_data(&pdev->dev, mdrv, 0, NULL, - 0); + priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0); if (IS_ERR(priv->pdev)) { ret = PTR_ERR(priv->pdev); - dev_err(&pdev->dev, "failed to register platform %s: %d\n", - mdrv, ret); + dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret); } return ret;