From patchwork Thu Jan 12 11:28:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 3907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3833082wrt; Thu, 12 Jan 2023 03:43:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXtbYBY7HwD12Y+2xovCzskoiKSuzdKceJOm5x1OMoJoJt0fw6dTz7gT0X//haPvfQ9W0yAI X-Received: by 2002:a17:907:a0cb:b0:7c0:8c83:79b8 with SMTP id hw11-20020a170907a0cb00b007c08c8379b8mr71034960ejc.53.1673523797879; Thu, 12 Jan 2023 03:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673523797; cv=none; d=google.com; s=arc-20160816; b=gGZFRJ9eu0f/PEEnGIMf4/zTQDy3ABoolw5RcjH/xq6EIO23bCnCyXNPpLum945TKa wX2unv1hU6aFubElJymQeIoSOaZmMstBYSEIvRPm1FZQQP1gmEhVhS7rnt0ET29vIm7g sS5pI73W1HEZWta6/okw5J+4SCGnzk0sWqy3jRD/bdz2jR7xnfQLq6GXkRQyij/zlBKR TxjjTQMwyglTNZJ/aJPM4qsTotMVpJNmJ7XGNJbOA9boduKximAlk6tpb6FXJ7WCTH3t uNJ0Bo1fUro44PcAl+BoT/ISfLHF9BYbJb+eAr+4Q9rqOBASptC7GvlK8e8q5TtHrf4d aGAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qLVdEI4bk/2y7tsE3P3xA60x7hpA250Og3OGqw2Sais=; b=fx5YiY+SLWXjQvFMUBYwFFyhXDIMFCZbtXAoycD43Z5D6Ofx2N4As2OGtejGB6esB0 WRBFw4C4PGHNopFD55GZdFD0Qj1/AlgLSSTEQ6LS9Kjv3MPsE1C7B+4v4PzZJ8wtkY3B 73M6flrqvFwzrQuI3FhCu2J0ra0GdVBgQTI2dx8IlzyDSRbIOpunvcnZ3hKQuzUGkuvW 1skVZZ0ZQheDf/+NFlp/PcS0keLkKnyKdEtoefcVRJJyeUG9VJ38POiwZdzbr/LNcl81 Z0ffXBrTI7H/eBywA2soDaSGMsd4B6xdQ4o49lkw9x2xn5eiF7InGya2gwi3eSfm6erz tKmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=W+9HwDTg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a170906118b00b007c16ef727a5si13553328eja.824.2023.01.12.03.42.54; Thu, 12 Jan 2023 03:43:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=W+9HwDTg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235693AbjALLh1 (ORCPT + 99 others); Thu, 12 Jan 2023 06:37:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232167AbjALLgS (ORCPT ); Thu, 12 Jan 2023 06:36:18 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57408FD01 for ; Thu, 12 Jan 2023 03:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673522918; x=1705058918; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mTlCGYhSJLhEo6MLNDgqqw8mFX9HYOQ2vC7ZnQjQzqg=; b=W+9HwDTgRwsNVT6pd1J2qr0PIDsvlhJqAptlRd3O0Ixa9sGkqxC/YxnB CKtubVSvoM8A6y3FvGWvSNoqqof9uu4nwr8kbQ1A9XzR92vvkXsvlJvQi kEZ5Qm6VPc/mBpEXK7nIKMu8Z6HjY11L7o78bfmOzgYM+u7NeaBUKHKWz fEq+wNQyhhnBclaG64jJW8ohc7H0ZtpOPp/bGJA81wEn5fws3V8OUPrYw TSjofDJ+7K3tqFieInMMVOLOIcxFTPROoVyZL94cknHWrGcVPkSxviqyK GhGXD9Iy6cKJSS/5VbEujDttMRoM8ZRZ8BYjFtYQ5r3MqoLwgit23WKfE Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="385994969" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="385994969" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 03:28:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="986519416" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="986519416" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 12 Jan 2023 03:28:22 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 622F0130; Thu, 12 Jan 2023 13:28:56 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Hans de Goede , Pierre-Louis Bossart , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Andy Shevchenko Subject: [PATCH v2 0/5] ASoC: Intel: Balance ACPI device refcount Date: Thu, 12 Jan 2023 13:28:47 +0200 Message-Id: <20230112112852.67714-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754816889957344297?= X-GMAIL-MSGID: =?utf-8?q?1754816889957344297?= While looking for the open coded put_device(&adev->dev) cases, where adev stands for ACPI device, I noticed that in a few ASoC Intel driver, among others, the refcount is not balanced properly in some cases. This series fixes that issue and converts to use acpi_dev_put(). Changelog v2: - split Intel drivers out from others (Pierre) - sent with cover letter (Mark) Andy Shevchenko (5): ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use ASoC: Intel: bytcr_rt5651: Drop reference count of ACPI device after use ASoC: Intel: bytcr_rt5640: Drop reference count of ACPI device after use ASoC: Intel: bytcr_wm5102: Drop reference count of ACPI device after use ASoC: Intel: sof_es8336: Drop reference count of ACPI device after use sound/soc/intel/boards/bytcht_es8316.c | 20 ++++++++++++-------- sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++------ sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 2 +- sound/soc/intel/boards/sof_es8336.c | 14 ++++++++------ 5 files changed, 28 insertions(+), 22 deletions(-) Acked-by: Pierre-Louis Bossart