From patchwork Tue Apr 30 12:55:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648986 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7D3BDC4345F for ; Tue, 30 Apr 2024 12:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=18S4u2zMzPObb9vVcfcsvc0un8sOFCFzykqSwvRn42I=; b=AQdxjvUCpl9pAx mpxIC/q8a4haUNmUAhiSZ9+y/zCb1QbjS+ggfmRmv40TnmYuxIKm4BQRkKMvwa8H8yyk0kj5bCKTf z0LlSbTQQkm+QXwWQCoCMzm0P1bUXVw1UZlkogN7yMX0rOOSOSoiW53Pt0WwCTr0Gr3TASiuz/fhv pqFbH0zwnmPj6AQ3iNREVVoPmEX1O7EDaRcK/1rJ87U2GAnMh3KYicAruI4eZ2a+so5U9qZk4DT9T GF7uDg3x8TY6+R/53iNoD3lTgupgmcE3TrkWcRtJpQbDxgCEII22UsEG/xmDrnRxHACzv/uhg0DsG VdNQ/9BxQxry8z6zy4hA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n1i-00000006P4o-1mzl; Tue, 30 Apr 2024 12:56:06 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n1Q-00000006Ov3-3Um1 for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 12:55:51 +0000 Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6ee2fb4ec57so1191661a34.3 for ; Tue, 30 Apr 2024 05:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481746; x=1715086546; darn=lists.infradead.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=cjV8GfCP2WHHQ01Aqc8mQQXzl2eD7DwGYj59FGy18+c=; b=TdMQKBF1b5WLUx+mf4auNLQrysQx0qU93I3D4rwZJgNMy8eQ7Dmds3HkZevMZsqtMD jiA69ftXXVHweUcGOLzAGWXPtdvYhiCjVgwcwRbrmUr+B7ee9Q73KNbdTcMxanGTiUxQ upB4zl8wR6LRdwzaV/v2N/w0ICeD8VxinVjPk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481746; x=1715086546; 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=cjV8GfCP2WHHQ01Aqc8mQQXzl2eD7DwGYj59FGy18+c=; b=ZvEjo/tOI47aKuDVGA+oCRRDrGphy75NjYVwayXOcz/3/INEbeliTJGVtNpBIhz9fW p5dj12wgYs0E8NtPgmhJ4Y5yzO4dPKLRO3bF7SsKxXAOLn0jlQASrv9WMLshmwzpzdzu hsWN2jSXlMRYisFjqMmQgpmHAsUg/Ip1O2GSrNiuKm+sgYKwoPMeiruBYaOSKne0JEEA 8TdLwUGve/g8s0zhg6m7bVaYx2S4SFpCnAqf3UNb/Py/bf4ZlfY60JnvAw9R3gQp4dBp ytcpkz0yGr4DieE2GJTRsnt0ORZ8+zKlPH0/E4VQmDIu0ZEj86HbgEwmX+F3shYIi5pH ck+Q== X-Forwarded-Encrypted: i=1; AJvYcCWzq3a+FZsoPC+VeClEUFAX4oHCndSOaWnDF++LePNztC2CtVxiTONxx6vxy7nCwDsxqliLK2B9xE80jjZdW6qeyoSEt57HgAklqRwAq6RkvS3Qq88= X-Gm-Message-State: AOJu0YwAsTuxH35wX5xzjHb21peiF4Ztqx7KvZRzYESsBIX8e40CyJwl N855h9GfGlk9NLt/frrdLpCjAQurmrhB0kiIcd15sxTy6L+5q01iUX8PSBisZQ== X-Google-Smtp-Source: AGHT+IEgUWZ5sviYRGNJaeAywK807QZ4gEbNChyUYkiHWKS+u2I4svAfqrFMNl4wY8mlmeEBL/dfjQ== X-Received: by 2002:a9d:7dd5:0:b0:6eb:e0a2:bbb4 with SMTP id k21-20020a9d7dd5000000b006ebe0a2bbb4mr2938580otn.16.1714481746548; Tue, 30 Apr 2024 05:55:46 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:45 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:33 +0000 Subject: [PATCH 1/4] media: bcm2835-unicam: Fix build with !PM MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-1-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240430_055549_124129_6223E64C X-CRM114-Status: GOOD ( 15.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver can only match the device vide the DT table, so the table should always be used, of_match_ptr does not make sense here. Fixes: drivers/media/platform/broadcom/bcm2835-unicam.c:2724:34: warning: ‘unicam_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index bd2bbb53070e..c590e26fe2cf 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2733,7 +2733,7 @@ static struct platform_driver unicam_driver = { .driver = { .name = UNICAM_MODULE_NAME, .pm = pm_ptr(&unicam_pm_ops), - .of_match_table = of_match_ptr(unicam_of_match), + .of_match_table = unicam_of_match, }, }; From patchwork Tue Apr 30 12:55:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648985 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5AEF9C4345F for ; Tue, 30 Apr 2024 12:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xHEb5p+NZghBvIsAX1NycOOXOn81HMzP9UoMCW4iamY=; b=wpjickv85LGjN9 JZ12IdGKWgArRd2GDxyslbPhz89I0+ZxFhzqtCVg8qi9OmzEjyfJemNT5Lp4z++fnut5uFsXpJMhf cqvqhLfExJvgKyK94wBtvR9G2xxuwG3C+9irk4fmQ/Apn3oJvov/b/R//gqLXp/qhRvHLvGjJsLL1 r6EISllIxHB8eKEw1NH59qINgy6hVVqJDjjkdchZZ2SBLC+uxuR6iMgealom7OJ8hjWd2YxEw602j eP4sDS0jM93oeDSpIyWM01webAH11ON3cb80BqmLRog9DN47WOQ5Zb4RSVJLCzJOMNRP07n/4KzgK b66B035tbc38yHjvF2CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n1j-00000006P5F-0lNb; Tue, 30 Apr 2024 12:56:07 +0000 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n1S-00000006Ovc-3RPf for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 12:55:52 +0000 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-79100a90868so119645285a.2 for ; Tue, 30 Apr 2024 05:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481748; x=1715086548; darn=lists.infradead.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=/vGWU+yuHMlxGeQ2v0UxRXrwFtugXz7htO5Olbld0OY=; b=XZOFYVFdENS8NgPsxiEutGL5QKMoPgo/8HLV7k52w+4677UrAys2mpyF8KBcUwKxVR l9vyxI9OMcPf0RrdZMg0KYQ9fXhzBQM8cVimeA9kV1ZpiDHciLedOv8AQrSe3gBa5Bw8 +N58z3tzNZ28mi8mGxtclwLsFYmg4pxGIgZu8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481748; x=1715086548; 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=/vGWU+yuHMlxGeQ2v0UxRXrwFtugXz7htO5Olbld0OY=; b=I6qJpSG9XFim725ZxbOFHoS0cm+FCoaJumcLTSzJKCIsNpGGpPNRNypw6NHNefpoED Of/GdJEmUyhr5S7BfxJ/jHGthFxSTcrQALEpeoBZG6ecJCTHASOdzFK4JqWyUQa22QKQ r8GB3sLyjJdNKJwWLRh2jijC035jnoX7S4C+1Z5ej4F1q+Iax37CVbwURjdB4O0IMUig pU2xfQZm39xJvDbOiCI94dtSXnUIh0VBkS3KZVRLa2t2YcTSbd395HYBaz9ZpcBev2ja 4c7mC19Z+mIeSqUXYdl2yeFBp/CPGgQppmAJ3H4yncwokcAl1VG9SqCX0tdqbOuCOduQ hUeg== X-Forwarded-Encrypted: i=1; AJvYcCUdE/q3IWHfyQjIJqE2IvwbdYqPNsx+GWYKOi9Hqymb1ouFsSAfMQ9ktzfM4NwQ9rB29VoAQ64tgMXUMMkGhctx9UCZNDtZymeqvs8yno+1qmmHgwE= X-Gm-Message-State: AOJu0YzKUpH9qJ2Wx3CB8KNe6Fj+U8Km7Bk8+Ezl7CPpKYuSdsBXD20z ROzqp5agjv11Y9xEgaO6hlF6Fa0Oyvy3OMapz+Wc/9EN0IqQ0SLKFl3plAO9kg== X-Google-Smtp-Source: AGHT+IHmc9EduiMj1OpTnvSkXwddOA0ZCHmY0W5Zlq6AnSEMhPm3qZQyuicCrl7kaS0cmeF1jbBCsg== X-Received: by 2002:a05:620a:57d7:b0:78d:68fa:6e41 with SMTP id wl23-20020a05620a57d700b0078d68fa6e41mr15004216qkn.64.1714481748273; Tue, 30 Apr 2024 05:55:48 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:47 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:34 +0000 Subject: [PATCH 2/4] media: intel/ipu6: Switch to RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-2-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240430_055550_913916_1BAE3086 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace the old helpers with its modern alternative. Now we do not need to set '__maybe_unused' annotations when we are not enabling the PM configurations. Fixes: drivers/media/pci/intel/ipu6/ipu6.c:841:12: warning: ‘ipu6_runtime_resume’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu6/ipu6.c:806:12: warning: ‘ipu6_resume’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu6/ipu6.c:801:12: warning: ‘ipu6_suspend’ defined but not used [-Wunused-function] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu6/ipu6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index 4b1f69d14d71..ff5ca0c52781 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -803,7 +803,7 @@ static int ipu6_suspend(struct device *dev) return 0; } -static int ipu6_resume(struct device *dev) +static int __maybe_unused ipu6_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct ipu6_device *isp = pci_get_drvdata(pdev); @@ -860,8 +860,8 @@ static int ipu6_runtime_resume(struct device *dev) } static const struct dev_pm_ops ipu6_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(&ipu6_suspend, &ipu6_resume) - SET_RUNTIME_PM_OPS(&ipu6_suspend, &ipu6_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(&ipu6_suspend, &ipu6_resume) + RUNTIME_PM_OPS(&ipu6_suspend, &ipu6_runtime_resume, NULL) }; MODULE_DEVICE_TABLE(pci, ipu6_pci_tbl); From patchwork Tue Apr 30 12:55:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648998 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EAEADC4345F for ; Tue, 30 Apr 2024 12:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K+N85pdNlnn+gDY2P6sRn2kZ24ThBYYDI8zuswC7B3M=; b=Ka8uTX+d80dmse An0R2lH3z5Z3HMM+IgpdoK75Zk6+ieA1bFmFVR3MpL9II3aF0vYJDmQ6jFXIBRZhZyXrTRcH6hWs3 FyGZ8eZAZaESVBtArsgGYaAx4C/DYXP5nHWKF3y5u+J1hSvEHNbwa+/rmX4mFsIKqOaJt/g69nJyN dkUy6YCtEaHI5n3JJ37x70QiV/5HwHhKwp3iJBhzhuBr5R3FuT1LNOM1Fv2vCtbX5dzmT1HmSwfZe PB1UNDz1hX6/6vdcdfJW2zIXoMsA3OSRm9PQMGUNaVG0AhoMx1XHHUh++E7vzhee0tqhrC/yRI67k xafOETV5NpJvRQqoLFcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n29-00000006PHS-0z8H; Tue, 30 Apr 2024 12:56:33 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n1T-00000006OwQ-2JQV for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 12:55:53 +0000 Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-78edc3ad5fdso481320885a.0 for ; Tue, 30 Apr 2024 05:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481749; x=1715086549; darn=lists.infradead.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=/GcAbiNwsFkaasnu7HjDiQ9YZzAJwofieKdp6b+SC5I=; b=XNYpG+jvFH6u9+SUy7rsFsoB4ktPaup0TU/ObSQF6rdMy8XTPSUn9vAjCWF4mYC79r 0iIy9q3Qp/kfzXgMhyMecJaxsg3kHjuToqBjRlquuj5+ELwJOGZUNBHQzcDISYommrfs WYxLdmZnDuONzytWvqVyp932llcFDkFdIBpus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481749; x=1715086549; 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=/GcAbiNwsFkaasnu7HjDiQ9YZzAJwofieKdp6b+SC5I=; b=wF/P03JUeHp84XobpDgF5uUFNa9KQPUbC3M/zJ1XpOB3oX8GNQcF9vpgkGpxXAgHJu pL1zvyjR9/77rsDFPRk6KO5FKdV4GiDajK3QU81evURCtUZii1ZuV+BXhZUqsf4cOc4G 0rndhkxcrPdBp07Ft5m2kr/v6583D9MusnnSBkc0708+Yc//lmZfAVWBiGwbN2q2YCX5 oyuPuB38CrgotltbFo8PkBrf4ydMa0Rx7Ew8r8zOET7v3OR/Nahcu/XtpNGktAr/hm2v STCjvWsSbdJtxvQZNheZv26vSiusg0q+aoYQ3eXModeiJKETfK351S7rzfe8cwnhTC3g IwDQ== X-Forwarded-Encrypted: i=1; AJvYcCUBRFxnzhKDEjPuDJtsSUDZ+knGYbNAGyzg3jqWEVDGzsBJfbeAKuSmyxSYa7ZbPd6yWlF2AHTKEdLa77wOMKN6ws1rN5AAYcxzncdIpHWqOdwG2jY= X-Gm-Message-State: AOJu0YzSNA5impldt7a3xMplIXq0652+S7lW2NE7aDznRxdMdk6jvcCn ip3X2SMchrEZr54RfMGiMYrKwGe7l3DHXlZaOCE+tRFs9vWDb5eC3a5Qw2W3oA== X-Google-Smtp-Source: AGHT+IHNUD/YiHktyxC/S/O2UQl0N67mb9RwGDBuz8dW13b6LjI/xcWOtt6224r6GWtpcizS5VcWeQ== X-Received: by 2002:a05:620a:40c1:b0:790:77d4:5e7a with SMTP id g1-20020a05620a40c100b0079077d45e7amr4364674qko.20.1714481749374; Tue, 30 Apr 2024 05:55:49 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:48 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:35 +0000 Subject: [PATCH 3/4] media: intel/ipu6: Fix direct dependency Kconfig error MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-3-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240430_055551_894782_B794BEAE X-CRM114-Status: GOOD ( 12.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org VIDEO_INTEL_IPU6 selects IPU6_BRIDGE, but they have different set of dependencies. Fixes: WARNING: unmet direct dependencies detected for IPU_BRIDGE Depends on [n]: MEDIA_SUPPORT [=y] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && I2C [=y] && ACPI [=n] Selected by [y]: - VIDEO_INTEL_IPU6 [=y] && MEDIA_SUPPORT [=y] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=n] || COMPILE_TEST [=y]) && VIDEO_DEV [=y] && X86 [=y] && X86_64 [=y] && HAS_DMA [=y] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig index 04cb3d253486..d9fcddce028b 100644 --- a/drivers/media/pci/intel/Kconfig +++ b/drivers/media/pci/intel/Kconfig @@ -6,7 +6,8 @@ source "drivers/media/pci/intel/ivsc/Kconfig" config IPU_BRIDGE tristate "Intel IPU Bridge" - depends on I2C && ACPI + depends on ACPI || COMPILE_TEST + depends on I2C help The IPU bridge is a helper library for Intel IPU drivers to function on systems shipped with Windows. From patchwork Tue Apr 30 12:55:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13648997 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 55173C4345F for ; Tue, 30 Apr 2024 12:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yGOn9Rm/euXbUxklZpNfUbvn0DlIlkLn3QhSyVX/usM=; b=ErOj7I/zMG/mO6 CEqe+KQAYl/coMMupME3r8gimWkkc30sIJ0BCuKdBwYiuGSEQV3gjcjqqljiLA6HyfSfAsNzLuuVI 9q74Ya+DLWwCHcsMZxY6AoqJOg76jTxo2ZXegiDvYhWpXX3jPyD7AXi4E/hIeAd36CJHj5h5PzW1B gx3rWGQXc4qv63M7UenPTx2VHRsmYKhoURSaj92r906aDJXmTokGfb/Pam2k9QaOrQ73O/DBGCc+V MFajSqE71+TMCZVjJhokm9bVe5f1MfURgNm47z8MWrqrp/ecpPpl/sJHlAlU068rikIBciuu6/Y6R vFQh+D3FE+772vvKhzWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n27-00000006PGV-46tg; Tue, 30 Apr 2024 12:56:32 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1n1U-00000006Owt-2dSH for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 12:55:55 +0000 Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6eb86b69e65so3378784a34.3 for ; Tue, 30 Apr 2024 05:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481750; x=1715086550; darn=lists.infradead.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=W3aDGh51WrAJ8PgiOFsXpuERP1GOnupX3ZgEurXatu8=; b=BPALGqfUKh/3HVFIVt+E2naGYGITpxpJhP6yBMKXAVwaiw6VIC88Ja8Tnrn+tl5Cgj Mfi7CuAYCIm0WCS4+yEpRxxj8bSNdKljVVT48VvZkmJXBxAyDdFNYCWv9sCbsRYgU5hC d+GSb/tfUhkdJJM7+V7tkF+LM2WG6J0AX/gdc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481750; x=1715086550; 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=W3aDGh51WrAJ8PgiOFsXpuERP1GOnupX3ZgEurXatu8=; b=T22jzB5irZUNAnCUNpt90oyEq/DCg6c91vG5bWFXg1DhuA6JCGrJkH9vS5UoLARXes qnY1PrMyOxFs0wED3X5PcQM5nWV//xDX33QH0A37H+dhSpHOU/sS0ft66rRzO+PJqXYW JPa3IQsmZ2dYC0ZprRrJQd9RrNp2wbw/54HsLeuZQky7MMoJAiG1QHPdnVTgxz73EN0y biSmYiWM4e0SSf8vdHs+vCxdlt7fY4ALxY70XDpX/b5K6VP3w3YKImLlVohTYaeF1e9f jhYptxgFCb3yYg8G9B8b8UC6+AxvQdhOlmCsD+y6N/0Li5tAIgCg5ZMIhgBxV3mE//Em FLJA== X-Forwarded-Encrypted: i=1; AJvYcCUNcm4oj6agUBq6sYORDIwereH6kAPoe5AGZr3F5wTccpMOLrWNZeVZL6SM/u3XEqu8BvH9F0wZQ9BXFOBILy7kTpX1jVMGUkPDhg4Z3GmwpH4W9fQ= X-Gm-Message-State: AOJu0Yzu59X6cX0j3Fm9+ql4AXlRY10VgbybWe3CMLFBO8hLbUhdIXJp 1/MOKtCttSDy3/yLQM0Zw2nvz0Rw9EiywYVvEXNVVuS/GD64HmK5YxTC0mSg8w== X-Google-Smtp-Source: AGHT+IE8F+k3g5uPOihti5THP9s3MwDIIlO9hpY6CvqxL5rmWFHHurCg96j6xwnb0ZfdYm2sA2WP/g== X-Received: by 2002:a9d:6e0f:0:b0:6ee:3720:aaec with SMTP id e15-20020a9d6e0f000000b006ee3720aaecmr8448773otr.16.1714481750570; Tue, 30 Apr 2024 05:55:50 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:49 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:36 +0000 Subject: [PATCH 4/4] media: intel/ipu6: Fix build with !ACPI MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-4-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240430_055552_866838_0A8A4969 X-CRM114-Status: GOOD ( 22.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Modify the code so it can be compiled tested in configurations that do not have ACPI enabled. Fixes: drivers/media/pci/intel/ipu-bridge.c:103:30: error: implicit declaration of function ‘acpi_device_handle’; did you mean ‘acpi_fwnode_handle’? [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:103:30: warning: initialization of ‘acpi_handle’ {aka ‘void *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] drivers/media/pci/intel/ipu-bridge.c:110:17: error: implicit declaration of function ‘for_each_acpi_dev_match’ [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:110:74: error: expected ‘;’ before ‘for_each_acpi_consumer_dev’ drivers/media/pci/intel/ipu-bridge.c:104:29: warning: unused variable ‘consumer’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:103:21: warning: unused variable ‘handle’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:166:38: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:185:43: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:191:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:196:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:202:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:223:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:236:18: error: implicit declaration of function ‘acpi_get_physical_device_location’ [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:236:56: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:238:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:256:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:275:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:280:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:469:26: error: implicit declaration of function ‘acpi_device_hid’; did you mean ‘dmi_device_id’? [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:468:74: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=] drivers/media/pci/intel/ipu-bridge.c:637:58: error: expected ‘;’ before ‘{’ token drivers/media/pci/intel/ipu-bridge.c:696:1: warning: label ‘err_put_adev’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:693:1: warning: label ‘err_put_ivsc’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:691:1: warning: label ‘err_free_swnodes’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:632:40: warning: unused variable ‘primary’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:632:31: warning: unused variable ‘fwnode’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:733:73: error: expected ‘;’ before ‘{’ token drivers/media/pci/intel/ipu-bridge.c:725:24: warning: unused variable ‘csi_dev’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:724:43: warning: unused variable ‘adev’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:599:12: warning: ‘ipu_bridge_instantiate_ivsc’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:444:13: warning: ‘ipu_bridge_create_connection_swnodes’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:297:13: warning: ‘ipu_bridge_create_fwnode_properties’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:155:12: warning: ‘ipu_bridge_check_ivsc_dev’ defined but not used [-Wunused-function] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu-bridge.c | 66 +++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index e994db4f4d91..61750cc98d70 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -15,6 +15,8 @@ #include #include +#define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev)) + /* * 92335fcf-3203-4472-af93-7b4453ac29da * @@ -87,6 +89,7 @@ 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. @@ -100,13 +103,13 @@ static const struct acpi_device_id ivsc_acpi_ids[] = { static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) { - acpi_handle handle = acpi_device_handle(adev); - struct acpi_device *consumer, *ivsc_adev; unsigned int i; for (i = 0; i < ARRAY_SIZE(ivsc_acpi_ids); i++) { const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i]; + struct acpi_device *consumer, *ivsc_adev; + acpi_handle handle = acpi_device_handle(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) @@ -118,6 +121,12 @@ 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) { @@ -163,7 +172,7 @@ static int ipu_bridge_check_ivsc_dev(struct ipu_sensor *sensor, csi_dev = ipu_bridge_get_ivsc_csi_dev(adev); if (!csi_dev) { acpi_dev_put(adev); - dev_err(&adev->dev, "Failed to find MEI CSI dev\n"); + dev_err(ADEV_DEV(adev), "Failed to find MEI CSI dev\n"); return -ENODEV; } @@ -182,24 +191,25 @@ static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id, acpi_status status; int ret = 0; - status = acpi_evaluate_object(adev->handle, id, NULL, &buffer); + status = acpi_evaluate_object(ACPI_PTR(adev->handle), + id, NULL, &buffer); if (ACPI_FAILURE(status)) return -ENODEV; obj = buffer.pointer; if (!obj) { - dev_err(&adev->dev, "Couldn't locate ACPI buffer\n"); + dev_err(ADEV_DEV(adev), "Couldn't locate ACPI buffer\n"); return -ENODEV; } if (obj->type != ACPI_TYPE_BUFFER) { - dev_err(&adev->dev, "Not an ACPI buffer\n"); + dev_err(ADEV_DEV(adev), "Not an ACPI buffer\n"); ret = -ENODEV; goto out_free_buff; } if (obj->buffer.length > size) { - dev_err(&adev->dev, "Given buffer is too small\n"); + dev_err(ADEV_DEV(adev), "Given buffer is too small\n"); ret = -EINVAL; goto out_free_buff; } @@ -220,7 +230,7 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, case IPU_SENSOR_ROTATION_INVERTED: return 180; default: - dev_warn(&adev->dev, + dev_warn(ADEV_DEV(adev), "Unknown rotation %d. Assume 0 degree rotation\n", ssdb->degree); return 0; @@ -230,12 +240,14 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev) { enum v4l2_fwnode_orientation orientation; - struct acpi_pld_info *pld; - acpi_status status; + struct acpi_pld_info *pld = NULL; + acpi_status status = AE_ERROR; +#if IS_ENABLED(CONFIG_ACPI) status = acpi_get_physical_device_location(adev->handle, &pld); +#endif if (ACPI_FAILURE(status)) { - dev_warn(&adev->dev, "_PLD call failed, using default orientation\n"); + dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; } @@ -253,7 +265,8 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; break; default: - dev_warn(&adev->dev, "Unknown _PLD panel val %d\n", pld->panel); + dev_warn(ADEV_DEV(adev), "Unknown _PLD panel val %d\n", + pld->panel); orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; break; } @@ -272,12 +285,12 @@ int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor) return ret; if (ssdb.vcmtype > ARRAY_SIZE(ipu_vcm_types)) { - dev_warn(&adev->dev, "Unknown VCM type %d\n", ssdb.vcmtype); + dev_warn(ADEV_DEV(adev), "Unknown VCM type %d\n", ssdb.vcmtype); ssdb.vcmtype = 0; } if (ssdb.lanes > IPU_MAX_LANES) { - dev_err(&adev->dev, "Number of lanes in SSDB is invalid\n"); + dev_err(ADEV_DEV(adev), "Number of lanes in SSDB is invalid\n"); return -EINVAL; } @@ -465,8 +478,14 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, sensor->ipu_properties); 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", - acpi_device_hid(sensor->ivsc_adev), sensor->link); + device_hid, sensor->link); nodes[SWNODE_IVSC_HID] = NODE_SENSOR(sensor->ivsc_name, sensor->ivsc_properties); @@ -631,11 +650,15 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, { struct fwnode_handle *fwnode, *primary; struct ipu_sensor *sensor; - struct acpi_device *adev; + struct acpi_device *adev = NULL; int ret; +#if IS_ENABLED(CONFIG_ACPI) for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) { - if (!adev->status.enabled) +#else + while (true) { +#endif + if (!ACPI_PTR(adev->status.enabled)) continue; if (bridge->n_sensors >= IPU_MAX_PORTS) { @@ -671,7 +694,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, goto err_free_swnodes; } - sensor->adev = acpi_dev_get(adev); + sensor->adev = ACPI_PTR(acpi_dev_get(adev)); primary = acpi_fwnode_handle(adev); primary->secondary = fwnode; @@ -727,11 +750,16 @@ 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) { - if (!sensor_adev->status.enabled) +#else + while (true) { + sensor_adev = NULL; +#endif + if (!ACPI_PTR(sensor_adev->status.enabled)) continue; adev = ipu_bridge_get_ivsc_acpi_dev(sensor_adev);