From patchwork Wed Apr 10 10:37:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893589 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 EDE0913B5 for ; Wed, 10 Apr 2019 10:39:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D06F4289DD for ; Wed, 10 Apr 2019 10:39:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4A13289E5; Wed, 10 Apr 2019 10:39:23 +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 183E9289DA for ; Wed, 10 Apr 2019 10:39:23 +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 94405883; Wed, 10 Apr 2019 12:38:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 94405883 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554892760; 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=jCbxMPVzp29QnTlnOz14GFNPnNuIeJAIxeb2hbagyTxV1VMzn8ihNvTbmCZ2Z5CL/ TSp4wi2xzQ6QV/XQmnb4aIhH81605cVgNocqFvnZEw2J0gqR/iRteoii7B6sraqw/K tUg5w5TxRTWFAP/oAp7qzqNZEczBMNsCUb/bwg1M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 557D7F89712; Wed, 10 Apr 2019 12:37:38 +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 7EFA0F896E7; Wed, 10 Apr 2019 12:37:35 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00048.outbound.protection.outlook.com [40.107.0.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E2299F8068A for ; Wed, 10 Apr 2019 12:37:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2299F8068A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="vjlEbidd" 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=vjlEbiddAA2v0xNY49YC9QPbD5Qcw9qw3q3un83gYtP84fDadicfYVmoI4Q1v1tyNinNpUXd2BId8f8noghioXXKzhygiNZBcw/eUdPCbdT4yloByjbhnEhOdM693nvu9KZnT8C40poL4WhP/UFfOB3r/Q4ksREMCpHTP0zr2Y0= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB5549.eurprd04.prod.outlook.com (20.178.122.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.16; Wed, 10 Apr 2019 10:37:29 +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 10:37:29 +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 v3 1/4] ASoC: fsl_audmix: remove "model" attribute Thread-Index: AQHU74llTOya3frf1k2uzJ2X5c1hIw== Date: Wed, 10 Apr 2019 10:37:29 +0000 Message-ID: <1554892629-17646-2-git-send-email-viorel.suman@nxp.com> References: <1554892629-17646-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554892629-17646-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: VI1PR08CA0085.eurprd08.prod.outlook.com (2603:10a6:800:d3::11) 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: 2ab55d0a-5dd1-43fc-3f46-08d6bda087b7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB5549; x-ms-traffictypediagnostic: VI1PR04MB5549: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(396003)(366004)(39860400002)(199004)(189003)(105586002)(71190400001)(71200400001)(256004)(5660300002)(68736007)(106356001)(8676002)(81166006)(81156014)(508600001)(36756003)(66066001)(97736004)(102836004)(6506007)(486006)(25786009)(2616005)(11346002)(446003)(50226002)(386003)(26005)(4326008)(186003)(76176011)(14454004)(8936002)(6436002)(53936002)(7416002)(6486002)(2906002)(52116002)(6116002)(44832011)(54906003)(99286004)(3846002)(316002)(110136005)(86362001)(305945005)(6512007)(7736002)(476003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5549; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: szUsqtwxWE4n07x3Lj5Iws9gSPSPaLTdnhrhD/VxvbQtEn4Z175vUjU13cvTr29+aeCAlLTbllXkiOBC4ZugaDdowgm/t3H1u+XFhy6VIaxBLTL1RQZ0r38Ob/FZtIyp0nOESjV62Jws6yHpyz6NW5aGk0qcY72Nhka9HhPd3RXFr1AKee8NFbGHvQx/EI9QkC0aJpIPmJwRgxhN6BGK3FczvrME2S1/eisHF9gh5ffeOWWEzWQhxJyTm+yjtRKSY5KivWQN5ZqBYCMSExriqLAS9Vkz6gv/hWECPN6MLkfhAzvdCXxUy0gj8spYTevLpcHHMjj3KeEaNVjO2KGnVwTDXtdyMJdI4hf5kklU+Q0M0wMJzcuPXi18RNHhzepZz8ODtEHUcN1RWeFd84IKyOj8Tc/cDRAtbOJ22DJ7diE= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ab55d0a-5dd1-43fc-3f46-08d6bda087b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 10:37:29.1666 (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: VI1PR04MB5549 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 v3 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 10:37:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893595 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 8720313B5 for ; Wed, 10 Apr 2019 10:40:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AACC289DD for ; Wed, 10 Apr 2019 10:40:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D89B289E9; Wed, 10 Apr 2019 10:40: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 52ECA289DD for ; Wed, 10 Apr 2019 10:40: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 4442488A; Wed, 10 Apr 2019 12:39:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4442488A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554892815; bh=NEn4XcyEQPcSTPeQblXZb3NbxEVKFZiGlxRYXlULCVY=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YYWKJ0oQEKTg38+y721FBH/y1nem+3un3ou2YOC/PeecQ3yL6WNA0gnuon4DLLZKr yNByfGrXBtbpW7v74VnapoBIvvSCxIqwKnuubkRDwMy6wSZzeabsvCBEzV7avqlPGA vcZ4nGBR1c2Jgrn3Zlw8KVJDXE1HXgm0Jk6GHChA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E9543F8971C; Wed, 10 Apr 2019 12:37:43 +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 8206BF8971B; Wed, 10 Apr 2019 12:37:39 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150078.outbound.protection.outlook.com [40.107.15.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 944DDF896DD for ; Wed, 10 Apr 2019 12:37:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 944DDF896DD Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Tu2g59tW" 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=+Wg5LBWzzo0TW0565rTD/oN6fNM+fREk0ZCk4YWh9gU=; b=Tu2g59tWWd/PBDH2C7KyZhLnsz1Mk6JM3Azmr+jzYnxBTYlaKeAcnOX4fVcsu8c1byT7gz9LNyipyJr17BGXsb7gJQYJwl7cL/i1IOrpU+GUGLEo4VgsgQNdbtvqOlEW/k3IyRiGYkgGpbDzxCCBFgcsMs1gCETSqEWUAMS9nho= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB5311.eurprd04.prod.outlook.com (20.177.52.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.16; Wed, 10 Apr 2019 10:37:30 +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 10:37:30 +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 v3 2/4] dt-bindings: fsl, audmix: remove "model" attribute Thread-Index: AQHU74lmyyBkUG6e/0616TsvWRCKcA== Date: Wed, 10 Apr 2019 10:37:30 +0000 Message-ID: <1554892629-17646-3-git-send-email-viorel.suman@nxp.com> References: <1554892629-17646-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554892629-17646-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: VI1PR08CA0085.eurprd08.prod.outlook.com (2603:10a6:800:d3::11) 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: d2ab7517-f2ed-4ec2-bd7e-08d6bda08860 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:VI1PR04MB5311; x-ms-traffictypediagnostic: VI1PR04MB5311: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(376002)(366004)(396003)(199004)(189003)(305945005)(386003)(256004)(186003)(7736002)(6512007)(25786009)(14454004)(52116002)(71200400001)(26005)(99286004)(110136005)(53936002)(102836004)(4744005)(54906003)(36756003)(76176011)(4326008)(316002)(97736004)(486006)(11346002)(50226002)(446003)(68736007)(44832011)(6436002)(476003)(6506007)(106356001)(3846002)(2906002)(508600001)(6116002)(5660300002)(6486002)(8936002)(66066001)(71190400001)(7416002)(86362001)(8676002)(81156014)(81166006)(2616005)(105586002)(921003)(142933001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5311; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: JfR3ryCHeWHcD0jUHkSFzKWf3x0lC43EulpPD3ThPuSYMK3wcQXbus21//QAZdhk81zYMbjh/mJ9UHrECh+Wsxw9pq1PVdlo0ftjc2Ue0ymB2cIbB8C7DkvHM6wwmNdgk/7PRgh2TMIGV2zMX5g5PWi3ANMdh57C28gctg6kE8HBa7fPNgB0QMLeYeBmXdy/NZqS9YtR6j9X6/d/DHKPeHQgBkWIq82Gw4ItuRyMhV1fDQL4pVhztdNSTl6txClHxK+zotUvs54MbLodlB4IYTuvA6Zp7exnWpm2ehAlW9vg5AAEukJ3l+fVjzJltOborxhnR++G7cwVeoq9LlUOf/om26Imzsccw+LrlEIngk27bX6LxG5AYcAlTHGax9aNgXoy9Bz9NmA/d9/ZRii8r54B4Ra86/2Cy1lsnbYpUnA= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2ab7517-f2ed-4ec2-bd7e-08d6bda08860 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 10:37:30.3734 (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: VI1PR04MB5311 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 v3 2/4] dt-bindings: 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 Remove "model" attribute. 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 10:37:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893601 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 DBB4F13B5 for ; Wed, 10 Apr 2019 10:40:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE48B289DD for ; Wed, 10 Apr 2019 10:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B19AB289E8; Wed, 10 Apr 2019 10:40:54 +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 ED67C289DD for ; Wed, 10 Apr 2019 10:40:53 +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 2A92C87E; Wed, 10 Apr 2019 12:40:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2A92C87E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554892852; 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=pOYiFlDCYKtScy3HrE5OzsMXyeuOGtxhxHWZJdhHCxS2vyYhpBxzSRkqc82wspESC nkHq298pjzbyBFVFgqq4zlpCT+J5iYQzAboMEf+znEnNBdJCbzt2PE9w0oRxaVu/Is aPj+HLpEJyi6DWxFF8qh+b3NoOmSQwpAI3FzhdWg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 44B79F89726; Wed, 10 Apr 2019 12:37: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 E1394F8971C; Wed, 10 Apr 2019 12:37:40 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150078.outbound.protection.outlook.com [40.107.15.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 413DEF896E7 for ; Wed, 10 Apr 2019 12:37:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 413DEF896E7 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="yDovSfjE" 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=yDovSfjElo23cFxy6j8XpObXYRGyWZXGnz1t5pQr6z078UcIbvJCx2Lc8lJwaoZ+EXGm1pb2kAklhimDA2SAybjtznqvXL6ew9EkdvEQtTpMUpVVHrKMUQDXSznusJozmNSTGNMLbstl9fJbHKluumhjbdsmcvO2V/4uUFBoOGg= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB5311.eurprd04.prod.outlook.com (20.177.52.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.16; Wed, 10 Apr 2019 10:37:31 +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 10:37:31 +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 v3 3/4] ASoC: imx-audmix: fix object reference leaks in probe Thread-Index: AQHU74lmAwDFsPbQ90OQFyNjLDrhBw== Date: Wed, 10 Apr 2019 10:37:31 +0000 Message-ID: <1554892629-17646-4-git-send-email-viorel.suman@nxp.com> References: <1554892629-17646-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554892629-17646-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: VI1PR08CA0085.eurprd08.prod.outlook.com (2603:10a6:800:d3::11) 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: 1c97b5d8-5969-4830-d2d8-08d6bda08917 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:VI1PR04MB5311; x-ms-traffictypediagnostic: VI1PR04MB5311: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(39860400002)(346002)(136003)(376002)(366004)(396003)(199004)(189003)(305945005)(386003)(256004)(186003)(7736002)(6512007)(25786009)(14454004)(52116002)(71200400001)(26005)(99286004)(110136005)(53936002)(102836004)(54906003)(36756003)(76176011)(4326008)(316002)(97736004)(486006)(11346002)(50226002)(446003)(68736007)(44832011)(6436002)(476003)(6506007)(106356001)(3846002)(2906002)(508600001)(6116002)(5660300002)(6486002)(8936002)(66066001)(71190400001)(7416002)(86362001)(8676002)(81156014)(81166006)(2616005)(105586002)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5311; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: lnooFoT5r9UXrq+AY+eyzGS/W3sEgNdHFVvF9kTuT11ssBrRTkhJ8ciecwUt2fDFTjN44cgY3SzoNQdW5P0s2dk6X7+vCrBvaiKiA2VVMWtTeA3nx7YgGsjZZSK3HTrSyhDYkuyz7KDwi+333XGRh5QeyhscStZ10uHG1FVudfzTc2bP5HUzpX41JiLtq0pQtPCpV2HMQRl2lGnMBeq2L4TZijV8XOxFmXMGUjRzcLMyOg/bZWSLIaIQvhYZW2rmqOKClQvqog11BRz9aa3hRPjGFckW/kkIvn0LMRCkx2S7lcbNnv2mOtLM+lMr4MbYjzTOeVi2bSPnOCEuVGf9/r1gmD2Rrz7dN7YoQTzBSJ7USxHvwY3aPQDvxKd5VLzxJdZ8sgKnPyt6bK0cw5zdA6U0tEiFq/XoK2We05GWCXw= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c97b5d8-5969-4830-d2d8-08d6bda08917 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 10:37:31.4922 (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: VI1PR04MB5311 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 v3 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 10:37:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10893603 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 D8C9C13B5 for ; Wed, 10 Apr 2019 10:41:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD92E289DD for ; Wed, 10 Apr 2019 10:41:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B134C289E8; Wed, 10 Apr 2019 10:41:36 +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 E549A289E5 for ; Wed, 10 Apr 2019 10:41:35 +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 2E58A920; Wed, 10 Apr 2019 12:40:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E58A920 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554892894; bh=9taTrFi84xFP3dABx7DF6oCFIN+IRP/icOy68cb8zBE=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=p/455Cx0ScCVenkLlXGrQD0Wqf2xy2iZLZ/Gt2HrNnDRynxt8i+M3dcgJkzYRv3IS EJ+UV+aDzswy346WEnz5Rleyif0SkruvsspXNxtPLKK6oxl+tkbe1Qqc8W9UHFYrRh DS6cwtt6lVppAVCQtC3Bm+DxotxrfmwsxGaw0uzg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5C97CF8972B; Wed, 10 Apr 2019 12:37: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 D3A48F8971C; Wed, 10 Apr 2019 12:37:42 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150078.outbound.protection.outlook.com [40.107.15.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9D498F8971A for ; Wed, 10 Apr 2019 12:37:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9D498F8971A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="gmeyMy3R" 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=zFuBnTaDWCUk5Nzc2pHPVDkfsEOZvJqcgHo9ZnZ2QJ4=; b=gmeyMy3RoMW4DfOLyPKLnJfSRtkUPPVR95R40bdE1kKKZwoidUCgA48HevgWQE0W5+RpqSGPbi9SRogzBxKXDnyve6aY+NGQBDgeuLLf1dLDaEdOqfIw5BjRInC44d5yn/r31ziUbcFFdIktlydcqKTKIG/lqiawUChguhC3pR0= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB5311.eurprd04.prod.outlook.com (20.177.52.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.16; Wed, 10 Apr 2019 10:37:32 +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 10:37:32 +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 v3 4/4] ASoC: fsl_audmix: cache pdev->dev pointer Thread-Index: AQHU74lnSBF1izhvzUSSxWwigACyXQ== Date: Wed, 10 Apr 2019 10:37:32 +0000 Message-ID: <1554892629-17646-5-git-send-email-viorel.suman@nxp.com> References: <1554892629-17646-1-git-send-email-viorel.suman@nxp.com> In-Reply-To: <1554892629-17646-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: VI1PR08CA0085.eurprd08.prod.outlook.com (2603:10a6:800:d3::11) 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: 13789018-5281-4c50-cc96-08d6bda089c8 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:VI1PR04MB5311; x-ms-traffictypediagnostic: VI1PR04MB5311: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(376002)(366004)(396003)(199004)(189003)(305945005)(386003)(256004)(186003)(7736002)(6512007)(25786009)(14454004)(52116002)(71200400001)(26005)(99286004)(110136005)(53936002)(102836004)(54906003)(36756003)(76176011)(4326008)(316002)(97736004)(486006)(11346002)(50226002)(446003)(68736007)(44832011)(6436002)(476003)(6506007)(106356001)(3846002)(2906002)(508600001)(6116002)(5660300002)(6486002)(8936002)(66066001)(71190400001)(7416002)(86362001)(8676002)(81156014)(81166006)(2616005)(105586002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5311; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: VIX24OEREhVEAs4QB8iib0HhcqIOTRLT1U/1v4kf4UzNVc6zGfP6KUwI9cMBTfDeqmjJZcRHMTbE1pzVlqiu/JQl2Znhfwq4+fyekbAv4I750N+fDlFTbstyO8c+7b1d96XG9JE9p7RSQMirjiZc4jSmzXGvfUpYR5gNpmPu9oL7KOve+Ai4SYJUXcxl8SeoZtOGDbFkH+lBElWv0FD1IALgaJTjJBt3PwqNco3rF8aC3R7eIfzu70KvPtaCIXOybnu0gPXAN2/fyNk1kMVRO7iyFxC5Vs4dhLmNFuSq5HCP9zzsj6ao/UJaUnVayJ31ckiST3EUh7ZTzIJbZXBBJWiWjHKoFUiplhuOOCKv+49YWGZ24hpydEMBiLTkMP7HXX5I+dpR7Vxq0rKtkC4Tjejk+C7/OYKXIO/ZXmPHU10= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13789018-5281-4c50-cc96-08d6bda089c8 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 10:37:32.6971 (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: VI1PR04MB5311 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 v3 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 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index dc802d5..2d10d8b 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,51 +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", + dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret); }