From patchwork Mon Dec 16 21:17:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910600 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB51E1D45EF for ; Mon, 16 Dec 2024 21:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383848; cv=none; b=kJm2tx/CdULfthaErQhCvqP0zHKS6VJX7pzrK5xcZk+D/7pDT0mqP1TT+HzIICjqIAn8BTKpIAULTLBxf5uUfyZcRunsStaJWAMIHi6MqWjWqCdBNf35TWeTkIDquYy7dfiIfr2Bb9GxJ7/hBIwXOZSwVkaO+e8LuVQ1NErxvLU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383848; c=relaxed/simple; bh=kKwZloJ+pxiytz9zfwyv5msK5QwJz26A7aW8bSu0I3s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jsNDYFBY9dWBmc9TNxosvdxWQkv0BcxkF0G7e/PLJ05XWtxkGKCUVOQcygozwMdUzqySO3N7wLc6k3uwEDZ3fGiRbaybM2n9lcvCUAeLBJEWnRhA0NOMn7YAz9WFecaw6d84syjA6HK3YMKVYVc4hgVsDhTVjx3rjioOnegS6KY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=RirRtlIs; arc=none smtp.client-ip=209.85.160.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RirRtlIs" Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-46772a0f85bso40897621cf.3 for ; Mon, 16 Dec 2024 13:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383845; x=1734988645; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kM2B80UZkeR2LPczGOfVlIBqSwSauWzJe2cC0H2QDRc=; b=RirRtlIskXwmaHipMITx24EyeCZsFaL6QXksT07tn27TpSzPZLiLexMe/AHK5oulAU J5mQxx7d268giF+o/uF9Qmggcagd+VNuPUu6p6Mww8FdZ4Ao+PCnALLzulW0N/kNNNaD eXDLvJ0+QHlHtKHntzuTQqEsEctSu9LdG+wfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383845; x=1734988645; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kM2B80UZkeR2LPczGOfVlIBqSwSauWzJe2cC0H2QDRc=; b=aR4KowuxWdRqM5LhLqCThaw7jkQ0rrRdtWZIhA3sQX0k+yyaaRd1GJesv2lQvSA+On JqEGZX++fB7/kIlQj8vncafac6da5rmL4e2X9D+WWxCtAeZLHH7qli2WWCAWCUCxP4pN UsFd0pNNhGxhYyQEC6srml6ALXTZG2VnhkStiNwDFMrCHyNS2dN08So/JkdLtxdCQ4Zq Sq+uTYOW7w6EcZkgbf0SFTvAHZpOe/jWcT8dU6BO6Cezu5N0/Nnd/e2bk9E8L2njSULb sNbT5+mVctDSaguFFU7S+S2qPrl+JGyOt8C7CP/fo/Bn40DQ4leAvPZKw79sWwW9ZYP6 hD6A== X-Forwarded-Encrypted: i=1; AJvYcCXsz1+YcuYSIZO6Lkruq7+C13brYUAW6H+wEPiNrh/jcKdfDjVBGHdL8vLw/hHXdni4NCFI3RlWbwI=@vger.kernel.org X-Gm-Message-State: AOJu0Yx6tuptfvl1r6/SPyhbLB3xMPZ2lFBsPsqbvuRzbgTW7CCnIAI8 ysC2aoPxgrba4h0CWySBq0gZxxdqG/erGS/LgO6gGd+JovTjJ8k44Q8n/ReJ/A== X-Gm-Gg: ASbGncsq8SVS35adKKGZ+PAH/NYHIW2BVDfK/hsSwQAxrO0iRdf+hwxWeeIw6b9xlVN lq7m79avcOPA2gaA3REM68EbhlOpJLQCl+PI/oapHIEYevX5fAaTV8rygOVyFNlLboWvKHM9waK cLMAdqo8ooRl17T7rxVubkcSnYQlLJxHZBGaPAXZuGb5cjtDKlOasvmSqOBbEWn8fg+11cs+4WT 7qJ8ny8gDub+FfBLystzUqPYAw7Tep6ZS9yshtzexKHe0pb5uQrX2nLX/DuWxnmPSEx5UGp2crZ PSaD6V+XypdiI+Or+biGuAOUZtcL1Ys= X-Google-Smtp-Source: AGHT+IHSGnqI6FhkQaL0069bHSXiDXW28qApI4WsVyO7HAsa7gVNw+XbMJ7VfZy9PvrVRyRjuC0jMg== X-Received: by 2002:a05:622a:1487:b0:467:45b7:c495 with SMTP id d75a77b69052e-468f8ad232emr17931231cf.15.1734383844801; Mon, 16 Dec 2024 13:17:24 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:23 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:15 +0000 Subject: [PATCH v5 1/7] ACPI: bus: change the prototype for acpi_get_physical_device_location Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-1-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda X-Mailer: b4 0.13.0 It generally is not OK to use acpi_status and/or AE_ error codes without CONFIG_ACPI and they really only should be used in drivers/acpi/ (and not everywhere in there for that matter). So acpi_get_physical_device_location() needs to be redefined to return something different from acpi_status (preferably bool) in order to be used in !CONFIG_ACPI code. Suggested-by: Rafael J. Wysocki Signed-off-by: Ricardo Ribalda --- drivers/acpi/mipi-disco-img.c | 3 +-- drivers/acpi/scan.c | 4 +--- drivers/acpi/utils.c | 7 +++---- drivers/base/physical_location.c | 4 +--- drivers/media/pci/intel/ipu-bridge.c | 4 ++-- drivers/usb/core/usb-acpi.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 7 files changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/acpi/mipi-disco-img.c b/drivers/acpi/mipi-disco-img.c index 92b658f92dc0..5b85989f96be 100644 --- a/drivers/acpi/mipi-disco-img.c +++ b/drivers/acpi/mipi-disco-img.c @@ -624,8 +624,7 @@ static void init_crs_csi2_swnodes(struct crs_csi2 *csi2) if (!fwnode_property_present(adev_fwnode, "rotation")) { struct acpi_pld_info *pld; - status = acpi_get_physical_device_location(handle, &pld); - if (ACPI_SUCCESS(status)) { + if (acpi_get_physical_device_location(handle, &pld)) { swnodes->dev_props[NEXT_PROPERTY(prop_index, DEV_ROTATION)] = PROPERTY_ENTRY_U32("rotation", pld->rotation * 45U); diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 74dcccdc6482..93d340027b7f 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -723,10 +723,8 @@ int acpi_tie_acpi_dev(struct acpi_device *adev) static void acpi_store_pld_crc(struct acpi_device *adev) { struct acpi_pld_info *pld; - acpi_status status; - status = acpi_get_physical_device_location(adev->handle, &pld); - if (ACPI_FAILURE(status)) + if (!acpi_get_physical_device_location(adev->handle, &pld)) return; adev->pld_crc = crc32(~0, pld, sizeof(*pld)); diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 6de542d99518..526563a0d188 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -494,7 +494,7 @@ bool acpi_device_dep(acpi_handle target, acpi_handle match) } EXPORT_SYMBOL_GPL(acpi_device_dep); -acpi_status +bool acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) { acpi_status status; @@ -502,9 +502,8 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld union acpi_object *output; status = acpi_evaluate_object(handle, "_PLD", NULL, &buffer); - if (ACPI_FAILURE(status)) - return status; + return false; output = buffer.pointer; @@ -523,7 +522,7 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld out: kfree(buffer.pointer); - return status; + return ACPI_SUCCESS(status); } EXPORT_SYMBOL(acpi_get_physical_device_location); diff --git a/drivers/base/physical_location.c b/drivers/base/physical_location.c index 951819e71b4a..5db06e825c94 100644 --- a/drivers/base/physical_location.c +++ b/drivers/base/physical_location.c @@ -13,13 +13,11 @@ bool dev_add_physical_location(struct device *dev) { struct acpi_pld_info *pld; - acpi_status status; if (!has_acpi_companion(dev)) return false; - status = acpi_get_physical_device_location(ACPI_HANDLE(dev), &pld); - if (ACPI_FAILURE(status)) + if (!acpi_get_physical_device_location(ACPI_HANDLE(dev), &pld)) return false; dev->physical_location = diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index a0e9a71580b5..6cc2614b8f86 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -259,12 +259,12 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev { enum v4l2_fwnode_orientation orientation; struct acpi_pld_info *pld = NULL; - acpi_status status = AE_ERROR; + bool status = false; #if IS_ENABLED(CONFIG_ACPI) status = acpi_get_physical_device_location(adev->handle, &pld); #endif - if (ACPI_FAILURE(status)) { + if (!status) { dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; } diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index 03c22114214b..935c0efea0b6 100644 --- a/drivers/usb/core/usb-acpi.c +++ b/drivers/usb/core/usb-acpi.c @@ -213,8 +213,7 @@ usb_acpi_get_connect_type(struct usb_port *port_dev, acpi_handle *handle) * no connectable, the port would be not used. */ - status = acpi_get_physical_device_location(handle, &pld); - if (ACPI_SUCCESS(status) && pld) + if (acpi_get_physical_device_location(handle, &pld) && pld) port_dev->location = USB_ACPI_LOCATION_VALID | pld->group_token << 8 | pld->group_position; diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b2e377b7f337..19f92852e127 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -43,7 +43,7 @@ acpi_status acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code, struct acpi_buffer *status_buf); -acpi_status +bool acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); bool acpi_has_method(acpi_handle handle, char *name); From patchwork Mon Dec 16 21:17:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910601 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36EF31D516A for ; Mon, 16 Dec 2024 21:17:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383849; cv=none; b=HKiT5gqJTep06bFWBbnXu5iHP/sUhwP/6Dh2oSOiSqejPl71oRUsYkMvGEAohxl2kvwI8d4AOpNdyvWL2q2XvmIX/eCrdWJkfzm8ycZJjb4foD95VdpL6J9Yyu4L2zP4BosiGhhA68aB6/hrJbhQ2/NruCLLl3Qf4y/7S1sIARg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383849; c=relaxed/simple; bh=e7SFMwzDWsXgzO/ZNzsWTCVExP8H4avRE4Psyn2EYBU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Crad5TRV5pvPmkcKzKS+Bbf0DuUUxWun7iRhNXK52IajWau85/rztZDWdgdtthlI69MsqhC4z3f0UVV4s9xfqBpScH1wQrNM1hMM8rKZyIOdAe6/oWCtqPBMicO+aYFyUKWDjkb/lnI1H6VQyd+FEj7BxF8sqxDQ9LuHk6bFF6E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=i+n7Bm4s; arc=none smtp.client-ip=209.85.160.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="i+n7Bm4s" Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4678664e22fso43342101cf.2 for ; Mon, 16 Dec 2024 13:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383846; x=1734988646; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Wrx/XZpVy8CcSfrt0QCmmOTT7oU2GR+FF7o9rBsUVb8=; b=i+n7Bm4sReOYy2is0Ik2ld+rfDnMgcXNbiTuFJ1dnSXDVn3+nUqdzXnM4x2DVcAuj9 6QmUyC5Ak9ZyJ60EkyD7e1aDHLcbwFvuVbSDl9sfmnEpeDRHc0MTSMemosc9KEATuTj0 1k1dFsHB4MThXVJpPJt6OAQrErapz1VA+sCFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383846; x=1734988646; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wrx/XZpVy8CcSfrt0QCmmOTT7oU2GR+FF7o9rBsUVb8=; b=kKoowIRS8fQ9kIIRvKL6rxyen4zf++i2QbI/qe3jbRId6MbrN5Plr9AiYotYTUeSzD R7HSv8GddKt6jdhpg0NsU7gE1T/XzckhGW5hdfi6fMazOBVYuycECea3+we+lBBwT9KJ YmJ3r8yhocoRIGKMMryLaIO9bxFnS6CQyQqgzer7pBLEhyVMfR0JL3SBam346PO/dAVB KYm8onPCCSAP+hP5eWc310MLINxC4ntNWRF3e9mCsCowksuRM3e8LcSH8qe0bAuKAPXL Nomb+RoMwE0haUwO9DK08xNp/u8M1/Tu2jqnay7fSfcVJZaymIXRVmCkpWF0gpwOnAcT 5mTg== X-Forwarded-Encrypted: i=1; AJvYcCUEyGoST5bFDKVOi3CnbKAcjAXW75+gpzRVze6k0/0qufNu80sC9wzJnn7Mqe/b8kApk+vPdm4YS0M=@vger.kernel.org X-Gm-Message-State: AOJu0Yyx4KcHho9fkXpeQsupiXlnzu6dnU+BkXDQun3jcx9aqNjEAybP MhOv5pr3hqtBYDb2EShZy4QNWNUnVwpXLT/Ja5U3Qd/5lRc69Vg5ws5HQVD8nA== X-Gm-Gg: ASbGncvSKNX93Wtd9rCsAJauQ+v3VCJNiLLkSH6Yr0co/Neoshp2VPvsWGAYew38ydI N+91E21BhQdT78ywEHE5yL8mWQQuCR9ztaBZs+lwrywUtHIDKcDV/apcqWkdGgIJy+5dvvRI0yl 6k61XrNF9NCwvy02/wKAJ327lrp3amcSRZFQ9U9PHcGZv7x7kpcdYBIS4/A0VqNlMxY6rpVP62C AXl0amf7ANfh3MLL044EF0LYJbPzVpPYgbAJyAoJLwJ/3laRi2EeSsO62J+M+/u/SjHjIfw+1Fu QnTtOc50LFJbrDTt7JhsmHMw4sdmfKI= X-Google-Smtp-Source: AGHT+IFe0W9f2W39cOFyxGiYpi+wHrRevZyo7XAuH0Mr2XhLF/7Z6NTzZgUOvov+yVRzbUrbAYKkSw== X-Received: by 2002:a05:622a:115:b0:466:9a61:273a with SMTP id d75a77b69052e-468f8b66f1emr17164551cf.52.1734383846255; Mon, 16 Dec 2024 13:17:26 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:25 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:16 +0000 Subject: [PATCH v5 2/7] ACPI: bus: implement for_each_acpi_dev_match when !ACPI Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-2-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of for_each_acpi_dev_match that can be used when CONFIG_ACPI is not set. The condition `false && hid && uid && hrv` is used to avoid "variable not used" warnings. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 19f92852e127..a9b5a5204781 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,9 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +#define for_each_acpi_dev_match(adev, hid, uid, hrv) \ + for (adev = NULL; false && (hid) && (uid) && (hrv); ) + #endif /* CONFIG_ACPI */ #endif /*__ACPI_BUS_H__*/ From patchwork Mon Dec 16 21:17:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910602 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACA501D5CCC for ; Mon, 16 Dec 2024 21:17:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383850; cv=none; b=lb4owYVOeVqwFUNsdMQ9MBUd4hNerTzs+pFRDMnZEWNgi0jNTKACaHKu9t7twM6/SySVPLX1UKLQrWhHd5oJbE82CHZ4YH5Gk4/Dzx0GrgPHrSwyaAABGjYmwYNBZHRcyt2ahSiasH/mjSP49orbODwjw8yPKk1bSAJe8EQXHAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383850; c=relaxed/simple; bh=X32i657SSLdAHHKEkAbumTOxZEIg1B0mwuSYHOFYedE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pJSXNDmksPWEI8m6f3n4qc+tP45F2N9YjCmB+YGIIYMZk1ogG1FI2nE9ZJUKywLdRQ4jbGAGIR33GOaeV0oVfQzYFn7+FaW1Q9ANTl9TeLIIytsO/1cTOBwO6F1ziCKvRvQK7ghzi9BIXpvysCYkRMOvP/459cqzC/LbnoQyyT4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=LSEs2M+2; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LSEs2M+2" Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-467a3f1e667so23692971cf.0 for ; Mon, 16 Dec 2024 13:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383847; x=1734988647; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WqBBzZFuR8Mx+keH2/BU5geK8A+jljM9pAiu8cpH6y0=; b=LSEs2M+2u4DUw7wALz8b4Ub6cQ2qEl/y/zuTqEE3TwDenbsNWiFE490qDAuagbC75v RUwY0bCqz9XbHcdpEcetZGUp/wPYfmGgQAPLKDbLGag8TmV81Tb+vMoLZ2aqvDn201/+ sZaqERXgCo9kspL1Kdh0UuH7V7U+WZPvH86Jc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383847; x=1734988647; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WqBBzZFuR8Mx+keH2/BU5geK8A+jljM9pAiu8cpH6y0=; b=Op4ssOfFxKaAgrlllPirZSQmEwVp/eiDTBUnYuyaZyOi4nwcMkBstyf7qcLFOGkhUb uSXRozuCxWVEIBEiiYwDFI9qVZFubVsCdpDR1zzZHpKHILSPrEiel08f6MVHrorDDxJ0 GH6nhr7zh1qFpRLzbIDnSXUUgCRDgSwOfUGDeeKqzX74yWvU0hQd2V8N6b/iQMZ/a3Q/ M9PT5zQMUY4qtO9T60rsw/4anRXuv1ZoxYlcAp16khntxN8G0UKUQCThRbiecvoIUz9p j6vZVFXkkB5vo4DSjwTfTcFgMGcqSwuYLarsXSTAF66GfzrV1Tj3iDxG6L2ZWvyb3nol dayA== X-Forwarded-Encrypted: i=1; AJvYcCU2IVUCs9BeHtdHJOwShGQJsIlaT65nI0v4RYmSC4FWkwYWAGo6uAX7fzOkt8B7wtq2WCXvEIYs8JE=@vger.kernel.org X-Gm-Message-State: AOJu0YzCtoT8zKYfJ21WbUdmBMNo5sqBUY+v6VaPSfNXGPzrLMAdyl9F MpWHXfglpcB+ofYjWlBXMeEuB98NNB8GW6DMEmVS2X3tE7Am/PZgfj3JFHIk6A== X-Gm-Gg: ASbGncv8wfUBqBc7xjr8NzKpuYMrQTmREGo80+UDnWvLDxl+1rpXQ09xrbXXm0a7+zA RSp0yx5w6yrmpW/rQaoFpDAUj7IGzmgG1KV+zQj6e4ZLEK6ufcHZGPcacY2/EnCKcQ2svU+xkU5 gyScJwd58DNx/wmqcP6PEsNdmA0X9SjjsIdJdschUaFJThVZXvY6shgxsZo8bZjODPrUc4uFQzG 1MURDycHAaixjmwFQVGbIx7s7IUBgIfSFcpV89E0NsN/C3Kty908/zbDeDu/I/AEwo+TGc5MOh4 60uy072ThPTZ1g44lMIDogh1RvTk7Pw= X-Google-Smtp-Source: AGHT+IFa0lE3VU6S7yMTSi6U10IiAbRleFzkYam8wiPnIWkXufZo9uMrtys/YCrx+kHmkm9mMlGHjg== X-Received: by 2002:a05:622a:1aa1:b0:467:79eb:4a16 with SMTP id d75a77b69052e-467a5721b4dmr271093651cf.4.1734383847705; Mon, 16 Dec 2024 13:17:27 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:26 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:17 +0000 Subject: [PATCH v5 3/7] ACPI: bus: implement acpi_get_physical_device_location when !ACPI Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-3-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of acpi_get_physical_device_location that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index a9b5a5204781..f38e8b1c8e1f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -43,9 +43,6 @@ acpi_status acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code, struct acpi_buffer *status_buf); -bool -acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); - bool acpi_has_method(acpi_handle handle, char *name); acpi_status acpi_execute_simple_method(acpi_handle handle, char *method, u64 arg); @@ -60,6 +57,9 @@ bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs); union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4); #ifdef CONFIG_ACPI +bool +acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); + static inline union acpi_object * acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4, @@ -1003,6 +1003,12 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +static inline bool +acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) +{ + return false; +} + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv); ) From patchwork Mon Dec 16 21:17:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910603 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D19E1D88A4 for ; Mon, 16 Dec 2024 21:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383852; cv=none; b=u7Gcgdavi8v1fQhhHTmV/eivGIek0WLONnDyy7m7AbzByO9VO7W5ZyGlB408uKi5IwXO8le77G/UKxb8qnUeu1qbwNe2zqPzaXafWqDiya9pOjhApe8uyjatG2ydhZ1LU/2C4YReyVGndZDO7iVCHKNKkMq9i7MHgtiP8uzXYAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383852; c=relaxed/simple; bh=OSI5+enbqVnK80hh3GRt2v2/xjuyertlyl2dDt3BvaM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s5q2K0xFEeZYYb0d2miQS+0Psi3dHQ18QuHDk4fx5MRpt5ZZ32E1frkE6PVFeFy9pa35EDq9m1QcQ6UExIIrPX5KIvzm884uJLncIsJdUGT82m+BgPwf/eeASaacvr88C3gWjgWdmdHpZ7gao2/xmiqZkfPzhDz6wxUu8+s3YMk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=fkTiktYF; arc=none smtp.client-ip=209.85.160.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="fkTiktYF" Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-467a63f5d1cso35181031cf.0 for ; Mon, 16 Dec 2024 13:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383849; x=1734988649; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=94GpRvEFGP1zDl7TooYa5XXxiXoizWnVF+RBMjgEO9A=; b=fkTiktYFTPmDeU9C4JP925QArvW+eKnHcm6j/H5w2zAykkSRytleeNs+VWy4zzwKTB +aYKjrb1UEjiGE6Du8jzPlIzSkdGhavIKg0Gbnk2WkrGHnPO3naJwCBiMxKlW8mBpNuN GOsPXWogbrd2ZH1g8Gj1fL7YemXx3isGnfgSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383849; x=1734988649; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=94GpRvEFGP1zDl7TooYa5XXxiXoizWnVF+RBMjgEO9A=; b=gBjJNX8eYgjNWMX3JrELRJnG4pQWXBHyR9x2cO/CyUV6gzT9GRQ19K3R7f4vkgFeJt qAC29Ba4meLoYhMT7zcqOhlUz2O5qMz4TT+rsGn2WvEcj8ipk8Cg4g19WPxsdwpnsT4d eIHPIYR+ujp9XiE5TRWDcjuEz9SRbS10oNosBrsnlLrt2+rh+cUKcSBWa0ghcpwmijv5 WUaSjUfGIBx6M5iye5jXsJnGdlGVp+T4aa45SfuaBDW3PZoxXZojz63Um1jpCPvrCx2f Ipsykr+YV7lZCycJT0wrXanT1p6CildCHvx0vb0gyrvlU4qwR5X0MKifbQNvYf0AlhkM +Kaw== X-Forwarded-Encrypted: i=1; AJvYcCWjXYvic3P1gpg/PCf3GnHI4xNKM/zakteSVOsXvBTidwzhdzz5RNILY9HG//Ke7sueOkrm5ECDffU=@vger.kernel.org X-Gm-Message-State: AOJu0YwMKCgq70uQvnMrWGu574OevCjB9DEF0yTwjpBlNtysg+Wne/X8 xyMtp3h6KSauKNnC9kW0N83EDrmVObNKlYj7xWMmL1t05HX/iUjnYgjIk7u1Vg== X-Gm-Gg: ASbGncs8cuNou6w5CzY8QFMcmeqlINNsUx031jUvKytn2XeLNaWRU6XUxQS8vykB0jQ 6hJfJ77tKHcVYJ3JGw1isb5/90+HEXbl0s65PKxht0ks2jzE7jWkTvxDMnqDQxooq8iPTNszbFc HtKwlWIqmVxxudlKt8dN0Kj39FOPYGirCYLkpTSqRidkbV5YJZIMdtgBSSOOiLOoZ7PELpCnxhL iiEQJ5HwtyoxOimUu0wwn7PZrJzKgXpMZKoOR8tp3izzBlx9+/J8G56GpWcpH5qd9aQNrCu8GeX 8N07fL5JX+8cJtkU1nx79TrECSz7mv0= X-Google-Smtp-Source: AGHT+IFyzGw+gglrqm8+RhNerLly3LfTpt0cYg/FTCF385N1SMb70IaANKI6otHSuU62jnflMlYR+g== X-Received: by 2002:a05:622a:1210:b0:462:e827:c11a with SMTP id d75a77b69052e-467a575a86emr267051701cf.19.1734383849004; Mon, 16 Dec 2024 13:17:29 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:28 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:18 +0000 Subject: [PATCH v5 4/7] ACPI: header: implement acpi_device_handle when !ACPI Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-4-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of acpi_device_handle that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/linux/acpi.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 05f39fbfa485..fb88f21bffb2 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -854,6 +854,11 @@ static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev) return NULL; } +static inline acpi_handle acpi_device_handle(struct acpi_device *adev) +{ + return NULL; +} + static inline bool has_acpi_companion(struct device *dev) { return false; From patchwork Mon Dec 16 21:17:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910605 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B45B71D90C8 for ; Mon, 16 Dec 2024 21:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383854; cv=none; b=JbRFmKkvd0DHWpoinUBtWPKH2Jr0LpT57c5lbRVrjkrLWaBH79dCzsRdsqWjJTXeuHVIGbJZrf21c8cd47A+Yxey2p9vsKF+MW2q5rwI6JMc6lCS6rnTqogGR/hdJlnwXUK61CbjltrwPByN+bvpTSw9Eq1RyFKDBE1HOSr69iQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383854; c=relaxed/simple; bh=95QUI19i+vnnT5+G1KHFOpDSO/pMrFLiSHBGkodQPoc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VBOYiM4HFgwHyE38qMTUUCARXHrzGA6GrPS1afzjMrrPTYwPMxcI4nZRa2KFLMi6jTBsSoNq9CXFdT0OiOvWyHmT5r7ZlWQgWxFGr4J3knlP78ZNfyGxOK83FcgWukZTYp/xDcwUEmOrVp+LYYP7mviChIm6dgYjXiScE4IU6LA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=OZKlqkrt; arc=none smtp.client-ip=209.85.160.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OZKlqkrt" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-4678afeb133so49880511cf.0 for ; Mon, 16 Dec 2024 13:17:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383850; x=1734988650; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Q9wRik7VAWXozMa2pBEsGGs4ayCPfnrgn33kguAxeWI=; b=OZKlqkrt9/2ONupx19ZzXA18kP6cweiU/xz/phCbkZJv0oh8Qajw9vF0Y1tWpO8MBE R1kwkFWtqtyfkzDbyWgXHOPB53jkFsqq0SJrkILJ+zKZUmHrjcGbbzW+G50g+LblXBPs iCbi9ciTLTmUskmHGwYd1H7CDftzpPmg98WFU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383850; x=1734988650; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q9wRik7VAWXozMa2pBEsGGs4ayCPfnrgn33kguAxeWI=; b=IBNHnjWRzEyQaVXOWzlUrtR4RS5copsn3S60Hu8M9dATlgGdY1WZoa6OmAGKHH/g7D fbSQ5YpT2Lo5gcBn0XnBQhNPb80LAsQCef1oWOo0DUU6JCzOuyrnA/UKuFqfohMvNamv MYYsLj7/fiR0dgEm74HCJJ+/XJfiy8hLao9WQ+FZjDOsklxfbKWRHYSDlDDxMgJS7oDw rO4gPruIuHys9BZ4qJmwCjmh+XlEMjL0R9Bcvm0G7Fiqdi+74Dij9fqu7QJ40PIGi+co nGtaRBjxLxVl/1KfyCu3VyjX0I/wwkFAdBP68LtwRhcNwG0mJJRlXhzDNu9TfeybuW0R 7xpQ== X-Forwarded-Encrypted: i=1; AJvYcCW905fm+xyD/nk6wK6uvu4AZdhoTQwM/qwGdHZepq+j4nlcCFG16Ntp53u6nDBeH2eIk1ZDfpRo4Hs=@vger.kernel.org X-Gm-Message-State: AOJu0Yx0HHS4J1RNs0lyj4O54fN1/YB2E29czOiayM6W5pAQ5hw3M1mS 9djX3VciCZeAqEVPU+7c9u8Itw/2O98Gh/Gj8JmBJ/ela9Xa0S6qROAdPSktCg== X-Gm-Gg: ASbGncuwxwGxEQpdAKpqiv0xbEP+DYSNSHZT3yglhon2jkO2drtRGlbHxHgPwRCyxWh sElOgkxbMJkHGMBAor+h9cMzAyEM8fzXS+lvg6Dq6i1zQxFKwrtqiATJ1QNbrJB/GzZ4omau48y WIX1WcBDKxwbJg8RaWKD9YJsIa6FWVCnemh2dU34p3X2JK1MrZ8YTg5MiuPZlJpT2B7v1BOPCHj qU9ArP5hzLOEMGCJ0o064I5rLt05XtBOeBdoPJoh3g5Qtqx6lbsPBYoUhjmUuwR7T27u1F+zfd6 aSml6qFCRcDFrFwdrO+zjxnRJvlXjag= X-Google-Smtp-Source: AGHT+IEWoLxfSlaf8rXHfYGdo/dNrMIk3fj9viLQXfHndjp90WcsgvICJeewTTVu5HvfhfYK4N5nnA== X-Received: by 2002:ac8:570b:0:b0:465:2fcd:cb0b with SMTP id d75a77b69052e-468f8df3bcemr12486021cf.24.1734383849763; Mon, 16 Dec 2024 13:17:29 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:29 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:19 +0000 Subject: [PATCH v5 5/7] ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-5-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of for_each_acpi_consumer_dev that can be use used when CONFIG_ACPI is not set. The expression `false && supplier` is used to avoid "variable not used" warnings. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index f38e8b1c8e1f..68c0e2fb029f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1009,6 +1009,9 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld return false; } +#define for_each_acpi_consumer_dev(supplier, consumer) \ + for (consumer = NULL; false && (supplier);) + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv); ) From patchwork Mon Dec 16 21:17:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910604 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 514D91DAC88 for ; Mon, 16 Dec 2024 21:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383854; cv=none; b=DODJtMww1NWsSsirZLM3kkAxbFwoJymUFMaT4nyKaKT3njAvEsPyxgfuXyjuCu7eEZow51auuQQPmMYMWk2FkqO2nwsxmoqxg9Wp7spCh4/zceEdvv/dDYBJik7dhTujYTQ8kfcrofYIQKcsMhK8NEEyXbdr9DhH1vU55qnmHDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383854; c=relaxed/simple; bh=Juo2ve3rrjlu9oDP30UIZmhGa+flQbphR9swoQR5GS8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r9PzAOjVLkjN/70i6/MW6aJCQF3k2+wvGF+rikekl8xV7qvdww4cx8CZzBM/qmeeU2lAufgwkihUzgH7Yq9SFb0AGOYMxbNsuxOtjgQRaVHHCdsXqx7EUagcyKJ+pTs9sP7MmNcuPv8BYNO4VW4Hzj55drn+w7pCZigDeV10Tr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ck7Az4yN; arc=none smtp.client-ip=209.85.160.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ck7Az4yN" Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-467a3c85e11so23948831cf.2 for ; Mon, 16 Dec 2024 13:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383851; x=1734988651; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JdfI8iMG82M8irlFSVYMbWfZvDLPeTNhiZE+t4N6pwc=; b=ck7Az4yNU1mMJp66dLdH5at7e8d7WaBtyH4gT39AhwIjPBkPwFHn+a46+0wShnHe0E 01R+r5E5DBuZ978DazWMFvzEHniQUS19ChznG0DpEQ+h/iSYD4Sxo7Z6lIvtF5O4m4CG wwKcjEOI4PvJWeo+vh7MpCNT1cDGbbBNi8BX4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383851; x=1734988651; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JdfI8iMG82M8irlFSVYMbWfZvDLPeTNhiZE+t4N6pwc=; b=df2zjskw7C8yR0i2AYMsqDVUF2Dw/5//NRCl4Qz8XYRm6GCfVp0fU4z0mTES6JZzMi 76AX6fojyqGyrSj7nKAjd1w+AoBPohLAo6Y2HOo6/rckQRmmWa6HRYUOSce+HwaaLo+4 wvSJtwzHcSj79mPF1BTLJJZBZ6hwIScGWHa4QCIRXKE3UFNQ6b2iXmZB6cObMTaZqqAG 5mVuNPEvUEGaGZdtc8LbpTO7+ICpfdQBWvIMI7NydvNGXC5N0YKutioWsPH3rOR+oUjH vRekjmuwmpf3s/DSX81FhySicXhsr1eOCsgJYPh93qqrJiCaULTrO1IIEiPA12hOK/j+ EBTQ== X-Forwarded-Encrypted: i=1; AJvYcCXP9WTKEWPJbXn16TwcK7Q46aRbdUQpx8lOPbrGah+A4H5+zh2744NYgWDafohafcljSYFX2yhnAM4=@vger.kernel.org X-Gm-Message-State: AOJu0YyXQvIiqXQjeJY4zqMSy1Ai35Inl3W0BxzDtKtcuQZxvJwqPtSJ 27ITf5w+Dhq9YbmHLddCS7HvjBmkOW955HyCmg+c5y4s9PCfT/vpjSGHQ7whOg== X-Gm-Gg: ASbGnctk67KF5lqzFMA0yiBd53r/AtCtWjcW/IiD28jO6bagmSosgh+Fe9e8Ci1l8NK Yge8W5N8wUNx9hGO0iVYTEw9mKfN5QwcJ5zgITbUPjry8Bn+p5ai6OM5Ae0CoUSGd/ScbTNKALT ExmJKRUxURk43s5D0+G00M89zGnMtbY9/TN0DMyYhXzmKZx5rdIDs51az4cJYXml+v3HHs2sL3X 2Ig9/Ttd6cu3IQ7LUVTKHdZP8OcgMpikKpXp2USSgz11nUqp1+I6gVxVzHb+t5H3XQJepzZZ+qE cNID7kvUI1rXpMICPUkzSmvI3WyUE3I= X-Google-Smtp-Source: AGHT+IEl8hUUhzs8PDA9iSUQEkMmOZX53TWYQb+JuoOBexm0lrDkqiD/7RB/yiHbTUvOThs4R816YQ== X-Received: by 2002:a05:622a:1817:b0:467:53c8:7572 with SMTP id d75a77b69052e-467a5759258mr245947171cf.13.1734383851253; Mon, 16 Dec 2024 13:17:31 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:30 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:20 +0000 Subject: [PATCH v5 6/7] ACPI: bus: implement acpi_device_hid when !ACPI Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-6-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of acpi_device_hid that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 68c0e2fb029f..aad1a95e6863 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,11 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +static inline const char *acpi_device_hid(struct acpi_device *device) +{ + return ""; +} + static inline bool acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) { From patchwork Mon Dec 16 21:17:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13910606 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3605E1DBB32 for ; Mon, 16 Dec 2024 21:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383855; cv=none; b=BmwnCTXRnQvA596TP1EbMsRyhv4F9q5g+6ZaEAeiclIkKN1IpolHscc/eHDoL30K8zBC2AfMQD4faYzTbxjg5iQdX9qwUeuREkHkKDbmV+8XRo2v15b8MwEzATwacIaOlZBl1k0x4xJCdR0qazIKq3rT+sU/k0ZARODE/w32suE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734383855; c=relaxed/simple; bh=IKB58y4snq/gqAR94o4C+T0eqQtkn7ecDZk3e6CYE68=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=M4W9mwy76o+BG53LF+qWbJ2ezqfnBAA3YAI/AhJNFQ+SnnvBXnp1m4Px4ladfuvN1LsEKY3XzLHUf5/v2X1LBOvWKMMdsnDuIMK97ekjBDpuUjTZDNEWno9VQF2R1qIJr/it9zu3vwQHfn/HTXqTcbI/LwZ6aWJI4yrqaoJoUgs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=GJPwkgNF; arc=none smtp.client-ip=209.85.160.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GJPwkgNF" Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-467a17055e6so47094091cf.3 for ; Mon, 16 Dec 2024 13:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1734383852; x=1734988652; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pSt2f8yebuqnlO+DsTFByKH2G3GRiRhWURC3O1KFqeY=; b=GJPwkgNFlEuz0Eo+vpfVsbPktf5ec6XKKDuEt1RQ1hOB+pdMWdEJCIRPeOOXTVeD+w r8i5ieBBTYy7w/lHAIqLfHDnPQYyxUZjRmC9ayjDAy0tNczRtAvk9T6UpMazzqA33S8W Z3PJNYgbgNXTLQ9SEwXsnkjyRnLP7pAENC8LI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734383852; x=1734988652; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pSt2f8yebuqnlO+DsTFByKH2G3GRiRhWURC3O1KFqeY=; b=F5ZddKf0KxWS1r/h4QP/urLgd4AIf/sUFkZrDnyKSvEVeqSOz5tPldv/PE+o1pvlAp Dz4c0BNG/whkZofNjR2OLEceotRZ20SeygUsYt4fcBsw/794KV1fM3g2mQDxiAPvLUzD nRNToFt4p3+L1/bTi7L6aNWDEFb/AkFLrJi8U6IYs2Xeg8CS0KHhNg532c+fyzO+k3uj uZXCZx6mWa1fdbkSbqrWAdQuLW6S3Xl65ekclc+3a17Vp4Tk3ZcuYFRA/SmcSzwOhXS9 MrSAlAz68axNpgv6w4AJnOR8AXsVmIeWDYUC57k0yBKd1tra/6DQIueuG4vTqdstisuW dFSA== X-Forwarded-Encrypted: i=1; AJvYcCX/e9ZXW0JfSXwg3jS4yT+LrvicD51pSNtlDXBVmHUtC8koYWqiv+30UbwDR8GCHhL7pYDArLTUd00=@vger.kernel.org X-Gm-Message-State: AOJu0Ywjq1EnH1ddwEAh0u6KPKYUcwWqPMTbjskAlQw8Z70x/tjJ8YB8 XeWsphR69X2h7KxZ3gkHlptU/oPhSkk8qZ/LaPbZxqg/zEN40n0qElihTg3EYQ== X-Gm-Gg: ASbGncsgtJBtGmpviDIsOCfn2XZVpWeHo7CGhkx8Y245G59/Spl2BQMBHxN7puDOiEr UHcu+cfjl8cmvyGA7yaKW0Ku5VQ3leE5VjUlFBzTekRyz8TTqpvCAmwOwmGCDzW98zlGKaIavEO g4F8Y9SQIxjJZrOXqfriS23JFOagjepw4p7+8itYJ4UqaUce5jKRC0INQRSfzQeJd6h3HfQpVP9 QQ4nZw8V4XbxGxuGFx9sqiBCSoINEspU52S56W3Wn4W+APq3PdcrkIYm1OrnykGdenOgzRWiyk/ nYHSNNLgaAV/fh6K9RJDQZ8FgcEQv2M= X-Google-Smtp-Source: AGHT+IGA7OE2/+AFr8NJQp1+beNCjHTix5HDCvzlrGBd1KJenMxv6YV5fSV7uyPrfaZdLlcoEJkjrQ== X-Received: by 2002:ac8:5a93:0:b0:466:a983:a15a with SMTP id d75a77b69052e-467a581d253mr223743851cf.42.1734383852093; Mon, 16 Dec 2024 13:17:32 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467b2e85c03sm31927501cf.69.2024.12.16.13.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 13:17:31 -0800 (PST) From: Ricardo Ribalda Date: Mon, 16 Dec 2024 21:17:21 +0000 Subject: [PATCH v5 7/7] media: ipu-bridge: Remove unneeded conditional compilations Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241216-fix-ipu-v5-7-3d6b35ddce7b@chromium.org> References: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> In-Reply-To: <20241216-fix-ipu-v5-0-3d6b35ddce7b@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Robert Moore , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, acpica-devel@lists.linux.dev, Sakari Ailus , Dan Carpenter , Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 The ACPI headers have introduced implementations for some of their functions when the kernel is not configured with ACPI. Let's use them instead of our conditional compilation. It is easier to maintain and less prone to errors. Reviewed-by: Mauro Carvalho Chehab Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu-bridge.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 6cc2614b8f86..be84c100d732 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -2,6 +2,7 @@ /* Author: Dan Scally */ #include +#include #include #include #include @@ -107,7 +108,6 @@ static const char * const ipu_vcm_types[] = { "lc898212axb", }; -#if IS_ENABLED(CONFIG_ACPI) /* * Used to figure out IVSC acpi device by ipu_bridge_get_ivsc_acpi_dev() * instead of device and driver match to probe IVSC device. @@ -127,11 +127,11 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i]; struct acpi_device *consumer, *ivsc_adev; - acpi_handle handle = acpi_device_handle(adev); + acpi_handle handle = acpi_device_handle(ACPI_PTR(adev)); for_each_acpi_dev_match(ivsc_adev, acpi_id->id, NULL, -1) /* camera sensor depends on IVSC in DSDT if exist */ for_each_acpi_consumer_dev(ivsc_adev, consumer) - if (consumer->handle == handle) { + if (ACPI_PTR(consumer->handle) == handle) { acpi_dev_put(consumer); return ivsc_adev; } @@ -139,12 +139,6 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev return NULL; } -#else -static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) -{ - return NULL; -} -#endif static int ipu_bridge_match_ivsc_dev(struct device *dev, const void *adev) { @@ -259,12 +253,8 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev { enum v4l2_fwnode_orientation orientation; struct acpi_pld_info *pld = NULL; - bool status = false; -#if IS_ENABLED(CONFIG_ACPI) - status = acpi_get_physical_device_location(adev->handle, &pld); -#endif - if (!status) { + if (!acpi_get_physical_device_location(ACPI_PTR(adev->handle), &pld)) { dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; } @@ -498,9 +488,7 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, if (sensor->csi_dev) { const char *device_hid = ""; -#if IS_ENABLED(CONFIG_ACPI) device_hid = acpi_device_hid(sensor->ivsc_adev); -#endif snprintf(sensor->ivsc_name, sizeof(sensor->ivsc_name), "%s-%u", device_hid, sensor->link); @@ -671,11 +659,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, struct acpi_device *adev = NULL; int ret; -#if IS_ENABLED(CONFIG_ACPI) for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) { -#else - while (true) { -#endif if (!ACPI_PTR(adev->status.enabled)) continue; @@ -768,15 +752,10 @@ static int ipu_bridge_ivsc_is_ready(void) unsigned int i; for (i = 0; i < ARRAY_SIZE(ipu_supported_sensors); i++) { -#if IS_ENABLED(CONFIG_ACPI) const struct ipu_sensor_config *cfg = &ipu_supported_sensors[i]; for_each_acpi_dev_match(sensor_adev, cfg->hid, NULL, -1) { -#else - while (true) { - sensor_adev = NULL; -#endif if (!ACPI_PTR(sensor_adev->status.enabled)) continue;