Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1474007pxb; Wed, 2 Feb 2022 05:53:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgmUdTAeEIBqt0pMWYwOquYyiUZsGl3GhuNuHSyPr73C5kmeRFVxlN1VsDgU+5UZzFngQf X-Received: by 2002:a05:6402:22bb:: with SMTP id cx27mr29876129edb.304.1643810017368; Wed, 02 Feb 2022 05:53:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643810017; cv=none; d=google.com; s=arc-20160816; b=FAGIWBBSGou+2nrekkRwXaB95AqG/arUhn5ylpMKXR6/aCUGCdPcRUIV+zPsAU8MI/ hWK5Lc1sHdKvVE6iBTCe2lkbDbWEn5Qu7P2E2GJmYafY4rBAKIXEqhfKo3f5mIWMIQQ7 I7EY4YfKvCiJVw8xJQQwZPPp17WzxMyyLOyDWs49NxWU4spQh+n6IAsFBOsA+8+OYoBW RZoxkSyzrQN9EBsQOzfB2rMzauv27r9WZEXU1QyXJhZVsMkQsenBJKluyxbrjWJmAIL3 mSVAPrlQv3yaKhxvlYEffG9Mp9w8Ff3kDvDgwPejbczaNtrA9xdWWCnR2T4nyzmNY3Zo YvHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=UQEYJ6FNj/22aeWfdUN39j4pVPrOKKMvEUtIZ9fV/yM=; b=ch0eLyxKhV2SJdP78QOI1H2eoLqYG6qQhylOraoRQOHovc/O2W9jGO2Rnz6ksmOhUx jjfWq3vzKmEnQJ6nhIxSHqOKLwRpX2EJWq+YMTo7Xq/7pCaIpDe+UFN0x5b0kyzg1WkY 0jRGPA8Pdas0dMX1Fxgvw9i7UK2Oqr9NDomvWNK5Cof/aIDi28/jgv1DMWlN48PALA2M svF4faEC5GDylcZ+IivpDIEOtXpHoeKeW9LYyqqhpzl4/j9LqR0vWCjCKCakF3BdmA9j GiHG7ZZHg3gVxiNeqzJ1EwIi4ukI8i8RldpoKInyQywxWNhRcmApltQUMR5FIj+f7hAv dZjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="L4tqzH/0"; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6si12613317edc.23.2022.02.02.05.53.11; Wed, 02 Feb 2022 05:53:37 -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=@suse.de header.s=susede2_rsa header.b="L4tqzH/0"; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234574AbiBAHL1 (ORCPT + 99 others); Tue, 1 Feb 2022 02:11:27 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:60070 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbiBAHL0 (ORCPT ); Tue, 1 Feb 2022 02:11:26 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id E732921101; Tue, 1 Feb 2022 07:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643699484; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UQEYJ6FNj/22aeWfdUN39j4pVPrOKKMvEUtIZ9fV/yM=; b=L4tqzH/0Thft58FFZVEi9/28etlOp9nAx0vIzL7GFLK/eV++KXuSIn3DwcPJeboZmt18ZU K29Q7S13OfmVYeBX1c8LmY/EQUf3faHReu2FvTXrmeV+mS0GNP/r2LHlG2Ibblvs/k7aHx tNgf6POduAqsrxV4c89wqTpgZUox3jA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643699484; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UQEYJ6FNj/22aeWfdUN39j4pVPrOKKMvEUtIZ9fV/yM=; b=yxjZR4zkyq5Dysj3QRI9ru+MGE9Pf1d/i1glzRzysh7iLTQeUQtp9a7Vi5iUzyOhhrcxO6 U04sHwUWv/MKSZCA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id D9A75A3B81; Tue, 1 Feb 2022 07:11:24 +0000 (UTC) Date: Tue, 01 Feb 2022 08:11:24 +0100 Message-ID: From: Takashi Iwai To: "Rafael J. Wysocki" Cc: Takashi Iwai , alsa-devel@alsa-project.org, LKML , Linux ACPI , Pierre-Louis Bossart , Mark Brown Subject: Re: [PATCH] sound: Replace acpi_bus_get_device() In-Reply-To: <2828205.e9J7NaK4W3@kreacher> References: <2828205.e9J7NaK4W3@kreacher> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Jan 2022 20:48:49 +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > Replace acpi_bus_get_device() that is going to be dropped with > acpi_fetch_acpi_dev(). > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki Thanks, applied now to for-linus branch. Mark, JFYI, this touches an ASoC code slightly, too. Takashi > --- > sound/hda/intel-sdw-acpi.c | 7 +++---- > sound/soc/soc-acpi.c | 7 ++----- > 2 files changed, 5 insertions(+), 9 deletions(-) > > Index: linux-pm/sound/hda/intel-sdw-acpi.c > =================================================================== > --- linux-pm.orig/sound/hda/intel-sdw-acpi.c > +++ linux-pm/sound/hda/intel-sdw-acpi.c > @@ -50,11 +50,11 @@ static bool is_link_enabled(struct fwnod > static int > sdw_intel_scan_controller(struct sdw_intel_acpi_info *info) > { > - struct acpi_device *adev; > + struct acpi_device *adev = acpi_fetch_acpi_dev(info->handle); > int ret, i; > u8 count; > > - if (acpi_bus_get_device(info->handle, &adev)) > + if (!adev) > return -EINVAL; > > /* Found controller, find links supported */ > @@ -119,7 +119,6 @@ static acpi_status sdw_intel_acpi_cb(acp > void *cdata, void **return_value) > { > struct sdw_intel_acpi_info *info = cdata; > - struct acpi_device *adev; > acpi_status status; > u64 adr; > > @@ -127,7 +126,7 @@ static acpi_status sdw_intel_acpi_cb(acp > if (ACPI_FAILURE(status)) > return AE_OK; /* keep going */ > > - if (acpi_bus_get_device(handle, &adev)) { > + if (!acpi_fetch_acpi_dev(handle)) { > pr_err("%s: Couldn't find ACPI handle\n", __func__); > return AE_NOT_FOUND; > } > Index: linux-pm/sound/soc/soc-acpi.c > =================================================================== > --- linux-pm.orig/sound/soc/soc-acpi.c > +++ linux-pm/sound/soc/soc-acpi.c > @@ -55,16 +55,13 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_find_mach > static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level, > void *context, void **ret) > { > - struct acpi_device *adev; > + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); > acpi_status status; > struct snd_soc_acpi_package_context *pkg_ctx = context; > > pkg_ctx->data_valid = false; > > - if (acpi_bus_get_device(handle, &adev)) > - return AE_OK; > - > - if (adev->status.present && adev->status.functional) { > + if (adev && adev->status.present && adev->status.functional) { > struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; > union acpi_object *myobj = NULL; > > > >