From patchwork Mon Jan 2 20:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13086998 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA3A1C4708E for ; Mon, 2 Jan 2023 20:33:09 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2728EA8D4; Mon, 2 Jan 2023 21:32:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2728EA8D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672691588; bh=JI+WQ+s6ndDirdEdZjDMNLxkK54gtzgsBmmyNW4/rLc=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=QqD7GIcRZ/rgTMmogIGqBfEfK8GwHQefUE5BSpDZDMwM73xes+cXn9FgfeSx3KtOc 6lXLEnwt0++yE3QJbxqPcS8VVzlgPxYrakfBL5mutatAb0JeSOhvyxq2hwws1QJ9HJ t5aqPp0lQG62rRbkn7FnQ14hcxxlB+m5bt1xyR9w= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A827DF80587; Mon, 2 Jan 2023 21:30:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3722F80588; Mon, 2 Jan 2023 21:30:20 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 41B29F8057D for ; Mon, 2 Jan 2023 21:30:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 41B29F8057D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=i6ShNVoP DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672691419; x=1704227419; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JI+WQ+s6ndDirdEdZjDMNLxkK54gtzgsBmmyNW4/rLc=; b=i6ShNVoPfbLVhh3ycymuisBLAduZW8bnDWrqvBGc2YQjIzjn9iNBdjIq RLyffaYw9rV7yofNsumvQIFsgjbPDRmOcObQQE810Bcic7Prt51ZTEpND UvsO8KBJJwCNOmvtuW5UvalijRqNLbyJwAVC5RNkWbsRNZYlW5IuTXyXZ PbTmmpYbs8XQKdWR7s3cjYSG16nVeqPNdqKKQ5IBc+nZyZ+fwR3wGCo/p 6e9xsJrBD7K85AM/OdRHvP8fVOihU8KfdgtmE8FV6gons8Pbg+0MUhKL2 mrbcT4qPwOOLVgWhRvmJmdZcVWSrYV3ZbNAD4ZcN/wP5Mbeo5WrS9L72k g==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="301224172" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="301224172" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 12:30:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="796962530" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="796962530" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Jan 2023 12:30:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B78B6F4; Mon, 2 Jan 2023 22:30:40 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put() Date: Mon, 2 Jan 2023 22:30:33 +0200 Message-Id: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: Cezary Rojewski , Kai Vehmanen , Peter Ujfalusi , Takashi Iwai , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart --- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bytcht_cx2072x.c b/sound/soc/intel/boards/bytcht_cx2072x.c index 41cec67157b6..9942a2de6f7a 100644 --- a/sound/soc/intel/boards/bytcht_cx2072x.c +++ b/sound/soc/intel/boards/bytcht_cx2072x.c @@ -253,9 +253,9 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); byt_cht_cx2072x_dais[dai_index].codecs->name = codec_name; } + acpi_dev_put(adev); /* override platform name, if required */ ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_cx2072x_card, From patchwork Mon Jan 2 20:30:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13087000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B4FBC46467 for ; Mon, 2 Jan 2023 20:33:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 66B32A8D7; Mon, 2 Jan 2023 21:32:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 66B32A8D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672691624; bh=aAfymOW/PhGFtC4itped/S1oIrcSAbEZCmbLAIqF9mc=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=k0Q6wppRE4wiO6FXQNhMoPfIXSpAZ9uXI26W7jIwZ2lvOd7yx1a6hba3qJFkECCzl YxXR5cRLdLHm40r9JwN7hU9YNqC1DT49h3YzEdZyOa/d6vnbtEjRT7nqKCpK6Pfj0M WtULypBbhos9iEqgTyHKOQWe/TsgL3gFfLNjCHoo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 57434F805AD; Mon, 2 Jan 2023 21:30:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4DBA9F805AE; Mon, 2 Jan 2023 21:30:26 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 27DC7F805AB for ; Mon, 2 Jan 2023 21:30:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 27DC7F805AB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ibq9Lt8T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672691425; x=1704227425; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aAfymOW/PhGFtC4itped/S1oIrcSAbEZCmbLAIqF9mc=; b=ibq9Lt8ToDkKfxDK/cJLq88cPsOE9WZOnyTPLjgK7kdog+YqqT0GAMd7 lpbbtYQgJh5MrvnHWhXvlo+kH+HLgKDus6HR0uQZ7Ky7vgcc5FzfHktAX GnZ76WEGVlFV/zne7+3kgIEWmrDpeokZ+/rRcZGIWnrDbkBch04bgC/Fg SMYtnF13RLE3HbIjALYKIiQwMoYb6V7LrMHPDDtZYDm5SjdTlxuKgOfg0 GCpUpDjbptvHRtZvN+eEHNDtaWQBEVCf6bZpmfQ3y9oPLZuoiRr/7BNms w+EUVGSNVNlwv/y0VTgwdg3XspPYSD+3GyXAE91nlxBBxu1hVh4nz9qWB A==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="322772212" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="322772212" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 12:30:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="686987612" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="686987612" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 02 Jan 2023 12:30:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id C64E984; Mon, 2 Jan 2023 22:30:40 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/5] ASoC: Intel: bytcht_da7213: Replace open coded acpi_dev_put() Date: Mon, 2 Jan 2023 22:30:34 +0200 Message-Id: <20230102203037.16120-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> References: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: Cezary Rojewski , Kai Vehmanen , Peter Ujfalusi , Takashi Iwai , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko --- sound/soc/intel/boards/bytcht_da7213.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index a0c8f1d3f8ce..a3b0cfab17b0 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -256,9 +256,9 @@ static int bytcht_da7213_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); dailink[dai_index].codecs->name = codec_name; } + acpi_dev_put(adev); /* override platform name, if required */ platform_name = mach->mach_params.platform; From patchwork Mon Jan 2 20:30:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13086997 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 534E0C3DA7A for ; Mon, 2 Jan 2023 20:32:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 78CCDA8D0; Mon, 2 Jan 2023 21:32:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78CCDA8D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672691572; bh=dLrrjgSaqjRoOiqz+AdzNR8EU6j9NIhl3046q90cLfo=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=WGaLFbQdmisPK7Bf5Au/QlZrFqI/OJPKGAr+ghafPk7mYS/HybPHwpKD5T6QKxKSC Sdve3sQbdnlSQCaY4mCf8iC/sZ2cc6rqVP0YfgxvmGNiBMZZ2ZYxNTTCMo6VVwoHR+ rUrFBBuwfbv96LeKwI4Wlyi1jrrBx5F9+ylbZ5VQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 28A4FF8057C; Mon, 2 Jan 2023 21:30:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 75AD4F8057A; Mon, 2 Jan 2023 21:30:18 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 59C4FF80571 for ; Mon, 2 Jan 2023 21:30:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59C4FF80571 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hvfxbTfE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672691417; x=1704227417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dLrrjgSaqjRoOiqz+AdzNR8EU6j9NIhl3046q90cLfo=; b=hvfxbTfEqT367shTAucAbCP8XGBfJUN5wNHuo1USY/kL9pAnxckkCBj3 HSHAtd0jUXO1hsV7jIyQYk0huPOmuIe5c4cY+mZWQ0CXKmtyMApcJDRrt +co7oxVTWdroeq/Yz9R3VIVYOJXup8p9Rdc/7qOnvr4IlsKdaFt2bpmcB g+uW5/2F7j6zCp0h8WtsxYdnQQm45TwFckHkByDoQfVdJoZAcq9sujkW4 jSzi8fMYiomVdUIwOBmy3ngfRbwF9iILQgjLqGdq75a+MVlpyKtwM3h26 s4O8voyNSQolnT1gm1sYHCc0ISe0qKWzKOo/mw0u9BQz4pc7vjMoAMGi3 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="301224162" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="301224162" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 12:30:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="796962531" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="796962531" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Jan 2023 12:30:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id CFEE6162; Mon, 2 Jan 2023 22:30:40 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/5] ASoC: Intel: cht_bsw_rt5645: Replace open coded acpi_dev_put() Date: Mon, 2 Jan 2023 22:30:35 +0200 Message-Id: <20230102203037.16120-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> References: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: Cezary Rojewski , Kai Vehmanen , Peter Ujfalusi , Takashi Iwai , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko --- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 25a054bd4073..875bc0b3d85d 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -581,9 +581,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev) if (adev) { snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); cht_dailink[dai_index].codecs->name = cht_rt5645_codec_name; } + acpi_dev_put(adev); /* * swap SSP0 if bytcr is detected From patchwork Mon Jan 2 20:30:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13086999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 217B4C46467 for ; Mon, 2 Jan 2023 20:33:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9940EA8B6; Mon, 2 Jan 2023 21:32:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9940EA8B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672691615; bh=Sj85gbp/SwC5rJk1T732yN9wn+y6PFIsoPKjxU2H1VI=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=IUiNK0x56EbEtaiG659OLgQtnNldZYBLPgQMQBQozJfF57T9aX3Hi+f0jwu+mEcuv 46+8R3HmhJhhI2s451mlgV81pntsnqRdNDl3k/moNWU2DPbigtnpfU1t1xtHX6ejDi XI8zUk6zG8RT58HxpAhSwXBvDvAODZw0wp4stKtw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D02F8F805A9; Mon, 2 Jan 2023 21:30:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3E7CF8058C; Mon, 2 Jan 2023 21:30:21 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 C29D2F80580 for ; Mon, 2 Jan 2023 21:30:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C29D2F80580 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GgLs28OI DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672691419; x=1704227419; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Sj85gbp/SwC5rJk1T732yN9wn+y6PFIsoPKjxU2H1VI=; b=GgLs28OIDUTWsUP9XbwunF93tuY2Nyu60VQ7JSowNttFzOTKAftz3GL2 XmkQroz8yeLQ9RE0uPyOevAMtRrdtnsSdIW0z4Whwy9PI2pWj6mnv97GW eU8rrasoxX1inT3vqMwGBYjFe3cd2VpfZC9uBeaWiO3IPVC964OcB+uM6 7WRr5tsJNJ1ApGsmBFDPi+WorlLqch7b+uAcDFKdO/eBuMgU0OMI2HkAw IhPBOJz7kiXirwKmO088hNI3lQjvFZOAklIzf2YYY3sc6NF8URacVOB+b YHblvCtkHVHjHkojPhsfHZBOzu25QOOvh6Ho+fHWKQDy+aQLUXvXZfeh7 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="301224167" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="301224167" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 12:30:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="796962529" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="796962529" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Jan 2023 12:30:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id DE4521CA; Mon, 2 Jan 2023 22:30:40 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 4/5] ASoC: Intel: cht_bsw_rt5672: Replace open coded acpi_dev_put() Date: Mon, 2 Jan 2023 22:30:36 +0200 Message-Id: <20230102203037.16120-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> References: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: Cezary Rojewski , Kai Vehmanen , Peter Ujfalusi , Takashi Iwai , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko --- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index 49d3da8f7316..daa630a0efc1 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -473,9 +473,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev) if (adev) { snprintf(drv->codec_name, sizeof(drv->codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); cht_dailink[dai_index].codecs->name = drv->codec_name; } + acpi_dev_put(adev); /* Use SSP0 on Bay Trail CR devices */ if (soc_intel_is_byt() && mach->mach_params.acpi_ipc_irq_index == 0) { From patchwork Mon Jan 2 20:30:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13086996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE076C46467 for ; Mon, 2 Jan 2023 20:32:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EBECDA8C7; Mon, 2 Jan 2023 21:31:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EBECDA8C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672691562; bh=CFo7ISntdmpoVi76v1LxoXR/BugA3bqZ0RVMplT5JSw=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=qhHUgyK2BCQ0LPbdIQBYq9buDpSrNF4ltgjZhSUVvqyc4Ld8BHgq9CaK7O+xaPceS 1csD9N+drNY307c6gwo1z1+S4G5B80YHThOfdoySgZ5ihZvbhQqaNSLHKD7S8ce9Fz hKk3w0ddO8vpp57OlcYcVLyL5/6egeocV7QplpKk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 808D7F80570; Mon, 2 Jan 2023 21:30:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12C4DF80579; Mon, 2 Jan 2023 21:30:17 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 724FAF80571 for ; Mon, 2 Jan 2023 21:30:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 724FAF80571 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GYIyfSYX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672691415; x=1704227415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CFo7ISntdmpoVi76v1LxoXR/BugA3bqZ0RVMplT5JSw=; b=GYIyfSYX+g8hfm+K3sVuz9xJB8oM3Aq3DDbVq7LqLbqMrArTdWtNLfXM aYC9FI0SMpxed+zblMdZC9/TZ/Gr44QoanC54BbFWVr1CUhzamJQ9G4cv IVuRnqYz4QLeKjWYJcsEZOFg3BlY12oJNjGqadlUYYlQvc2r47PAvPawl tnu9UTdvQOJolH4N9d49AxKcaAQqiW5sJqYeR9XjwXXR9bAD72tRA7KVe rPp7iGVH0ljr+fl9cTHLHWAn1hQXGQpKfbsdTYXDTS493mUuI8K0Cxh8m M9Byxtr1lFv1foLyFQss7bpie4w8J1Y0ouivMQeHrZY4GZqrjMgyYqV3x w==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="301224156" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="301224156" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 12:30:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="796962523" X-IronPort-AV: E=Sophos;i="5.96,295,1665471600"; d="scan'208";a="796962523" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Jan 2023 12:30:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E3A3219E; Mon, 2 Jan 2023 22:30:40 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 5/5] ASoC: Intel: sof-wm8804: Replace open coded acpi_dev_put() Date: Mon, 2 Jan 2023 22:30:37 +0200 Message-Id: <20230102203037.16120-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> References: <20230102203037.16120-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: Cezary Rojewski , Kai Vehmanen , Peter Ujfalusi , Takashi Iwai , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko --- sound/soc/intel/boards/sof_wm8804.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/sof_wm8804.c b/sound/soc/intel/boards/sof_wm8804.c index 54395e2ededc..fbad5a73de44 100644 --- a/sound/soc/intel/boards/sof_wm8804.c +++ b/sound/soc/intel/boards/sof_wm8804.c @@ -269,9 +269,9 @@ static int sof_wm8804_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "%s%s", "i2c-", acpi_dev_name(adev)); - put_device(&adev->dev); dailink[dai_index].codecs->name = codec_name; } + acpi_dev_put(adev); snd_soc_card_set_drvdata(card, ctx);