From patchwork Wed May 1 13:08:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13650749 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 42657C25B5F for ; Wed, 1 May 2024 13:08:38 +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=J7jccS55bTPnwb7JmfRsxvHjEXgRAyHn1jmS5HR4Kc8=; b=eSBOIOYTIJZR+E 7pTehVFuUzvgtqp6NDNU0Y1x7nSIGIRvQbyTtkU1ymI4DE23KzMfaTcRQVwX690dUKvpm1OR/wGGO 9Ffmwd/NtGYcEzDobe6DInlfF9dhFbsR9C/ataxL2bD/JhXB4+Nl9PgVfX9I7VMf2nnLpg8RuVsk6 fQrTvjKAeZVzGsN8xkqlIrrqifvPkTiYhg6MyQHhT5wxLpvH+ESUYW46bjeto3AmOsjyO7E9vJ0Hn Qf9QPnOCT2rBpOHp52y9+sGpmfUB1LAgXLf5Gd+40h1nLf93JHgfxCXzL6KphqFFTokrnFgVnPCKr PJPAZYcKLZ/pWWnGn+Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29hA-00000009dj2-2WNt; Wed, 01 May 2024 13:08:25 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29h3-00000009dcw-2sW0 for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 13:08:19 +0000 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-6a0e72e19b5so6402826d6.3 for ; Wed, 01 May 2024 06:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568894; x=1715173694; 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=t4YWfk8RHGxp4UPGDejpf4mUjri4mE+IBxPLABnVZ8s=; b=HWX4oH9f0TaJCDYJoTZzUdnqT4UgLNb9a/0vm3aXaIEKFl8mTbtF8fCq3hzNe2pDbz 8FkqMH+70cIwByPTRRLih/sxdI9jrN1EScEHpHHLu2hZDW3J7TtuGcPxV3vUv1vSAjb2 pHYSVuU6LqDe712SBDc0Ng8VnMr+74L+59lvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568894; x=1715173694; 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=t4YWfk8RHGxp4UPGDejpf4mUjri4mE+IBxPLABnVZ8s=; b=S1EFJeaw8AIVMW2dT9gsUvs2tMe+h3ntPw74zhzvH58S29EaLQQnw4sKeKF2I/OgIZ J+qvtjL0YfjP0govOUN9S6rYS7ca2ay6B5OWea4ReVPuHXmzVI+dMsSA85UkEgGa9JYj FcyE9pvIhB2SenAGxkyeWByrgaq332i5LYIAUx4cYhynQhxN9JkW05YZjBHs+hWYTbCe /x5+5cWhRNgNfJv6ll2WWYMzMQZcHfgPcIvo1s438e67NQUt6lXykPqDTYThRgl4QgTk xtZ5ZsMxsozuDJcDWmTfF+7PNpSwEieAtOqTm9oCGD/J6JCD/3TEK06xoofKaZcjZIAa 63UA== X-Forwarded-Encrypted: i=1; AJvYcCXX16tSZoPZvBuJGJB7yBOqxPTVfBBuYoOIL+6KfI11k1HNlNYRu8tz6mLjI7iRH2qCXgxDX42gNbqnEn+vj8FoXX6qRCIbhMx+JDvhdby08g1MOyc= X-Gm-Message-State: AOJu0Yx0aqnO7J0nzD7zh4FLuFdCjZ4sjKLLYYVTyr7nbb6bxeSDV9gu 3O6z+lUxJQVnBN7EZj2U0Sm9KVB/fXyhNX0SNn6+1DgqzA7qR88uVm3ohr7kSA== X-Google-Smtp-Source: AGHT+IGq5qL9sa8p5ZZp4PD7t6F2nP9QMolqC/miQC8Zec7V4HBvxkYsOoa5pPf0S1YbJ4PC1AiGEA== X-Received: by 2002:a05:6214:c8d:b0:6a0:caba:7e36 with SMTP id r13-20020a0562140c8d00b006a0caba7e36mr2957189qvr.29.1714568894525; Wed, 01 May 2024 06:08:14 -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 l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:13 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:09 +0000 Subject: [PATCH v2 1/5] media: bcm2835-unicam: Fix build with !PM MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-1-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@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-20240501_060817_759714_63329210 X-CRM114-Status: GOOD ( 16.10 ) 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 Wed May 1 13:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13650747 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 11545C10F1A for ; Wed, 1 May 2024 13:08:37 +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=hYOz+rmwfgetHe7Kwc/O1mM8CQcRtnSUaODw6lEHjyk=; b=DoAayfITeGC0ZA c5lp8rTFI9g4Pq06nYv4RIZxDCu6Upq9CVLg0OCDecNZ9j+BXkWeCniWGhcF8Ox338q5tzZRonf9X Cx3qfShclBlgtSK+JR8gKpOE/jdsGC1KLaoZNDFUum2SBfO9f9zz2dCAWgJjOC6BoxL8Fp21/woaB lP/NyuBS9/n1BdrOjb8Xi+/lblv0vh1FH8JUWbifqBLXQYZgcB4SxszmX0ZbcsPQ62qqsGSbsbenf +7Xux0jhv0dZ67rlgpb5DTjMKCqL0QrojgWKDe5XV2BuYVI7Jmn3xIzvo4kIX+bskFrGbnnAMHnR/ 2r4EtA5zrADqFe+cT5hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29hD-00000009dk5-0BVC; Wed, 01 May 2024 13:08:27 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29h4-00000009dd5-19Nq for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 13:08:21 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3c70d8bb618so3050509b6e.2 for ; Wed, 01 May 2024 06:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568896; x=1715173696; 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=yIqrh9vxITy1BabNVOF1UFebsQdvmndT0UdjTkJUAiM=; b=KBlBxYBixdOUgtxULAK0rPdMDgmAOnJO7x8muDRQv6MEbeoayOKJjdDYXNULTfUh58 5OxKueMmSB7A/ACbOmp6hOa9rD91vcMsuCVmKUrOi/06ztgt9qh9d8XVGFYPVs6AJSul JGYHX+NZlBlQMXV8C9xnYDerkpK2pJTs3rGWI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568896; x=1715173696; 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=yIqrh9vxITy1BabNVOF1UFebsQdvmndT0UdjTkJUAiM=; b=dDY5Hy8Ey8JEUF2mg+8mmFvbHdvlApjqOvFEt+PlLkNCR09k8LvlL+0GvkPpPv3sAT VgiDFxgyvTjAtIPUQOKZsdUL3iTW11/VQPglHAtRWK/NrGWi/AsbbfgeTr4BVM+mMTZu 2n54tp0KCj05YozvvR33AIC+tNabvvYgUc0Og75TgekQH0JfDWOmWL7Fj3zpcF/xJSLs DRBphfa0WW4MEL7WYcVET/93aNBKr7HriUO1XGcuvj0nRue3mS5BRREZ2KCM1QuU6IIV Zwr7IGaF3M3+Grgx/H6Mt4M1X5bc1wnmHjoGjrF2sIc54RTDEpAhFubx5yKcynqtAWco YB4A== X-Forwarded-Encrypted: i=1; AJvYcCW6i7Ybp0VClBsM1PQfP6wonz4f0B3leholINExq9T3dwyF57hPeeA8PvQz9ZMRVD85k7WxU6vXunr5Gwcn54ZrLhhwTlEC8ep6unS8n5ADPtjB3g0= X-Gm-Message-State: AOJu0YxWzQye7PiUWZasiNe8p7m9gGR/n10v3BUJ+vF6ysw+njg9Rbrl QX1VeYwfXzMgNdCFLq2ezCdDusmkUOn4BHMYiyuxkn6XgsAfrlPHViJZmfGAQA== X-Google-Smtp-Source: AGHT+IGFB0XhtvNukEJCBP+GoB2QKQrdFJkNpDYdG7PKY86Xxuy4bsWI+JUYUd6ulPAr6zKIgAEWsA== X-Received: by 2002:a05:6808:14d2:b0:3c6:1510:f35a with SMTP id f18-20020a05680814d200b003c61510f35amr3484615oiw.9.1714568896002; Wed, 01 May 2024 06:08:16 -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 l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:14 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:10 +0000 Subject: [PATCH v2 2/5] media: bcm2835-unicam: Include v4l2-subdev.h MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-2-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@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 , Laurent Pinchart , kernel test robot X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_060818_438654_D8FD7E05 X-CRM114-Status: GOOD ( 11.55 ) 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 From: Laurent Pinchart The unicam driver uses the v4l2_subdev structure. Include the corresponding header instead of relying on indirect includes. Signed-off-by: Laurent Pinchart Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404302324.8aTC84kE-lkp@intel.com/ Reviewed-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index c590e26fe2cf..3c7878d8d79b 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include "bcm2835-unicam-regs.h" From patchwork Wed May 1 13:08:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13650748 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 16DBEC4345F for ; Wed, 1 May 2024 13:08:38 +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=XJLLMMDxZbXDnRDtLYdjWi11nUHQP9oQ7E2pZj0GXRY=; b=YmdOuF/E+MpKgi AZmKgI+/nArlNOt5jTOuwuo+xnEgAYMTFvBRaIRVUteD9VychJeBKeY1moHSTQjVhuO1gj4MXfqGJ 5QVi8go5/keif38serBN+ach/oDTPwS/ttL+QFtNlLoyagEf92hG+7oOf/zdgd6umiCxPSyy/68vr SGywCkfolA0NVArSPVmgPZ+iUbUJwGKWBXYf7sYWQjwX2YNM5pmIRxDUoAG5lpkLeBiGIye80N47J cvoCpSSdo/heZmxOVu/KnCdIiYyNxjPWwW531RFHhDdcqVDYwM0z/qq/++AVSvoLuKZktIhd75G8s JQ1VZ/TVXconuFF7xNZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29hD-00000009dkd-3DlK; Wed, 01 May 2024 13:08:27 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29h6-00000009deE-00Sa for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 13:08:22 +0000 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6a0d1032362so12388496d6.3 for ; Wed, 01 May 2024 06:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568897; x=1715173697; 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=MGnbq45Q3aIVVsIxi/7+e6D9e9h4LgaesLx5MBsPbWY=; b=fQ3rwup5kAK2//O1dtan6peohExP1RSdvPmguKLpwLBnkIWlhCP3Y078pD6jUZ7Jvh tjYZUzoPCEq/0z8zB5b55D6TsNQ01oGo5PlzzQGoMCobNlhLSN/FTSux3R5IzP1eX1DT JCB5ynGuUaEsb0nq/ofeOlyvXxBmfe61AloZg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568897; x=1715173697; 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=MGnbq45Q3aIVVsIxi/7+e6D9e9h4LgaesLx5MBsPbWY=; b=o0glBECJosrTEeBTTxWnLRorKUubOVxEF73Z0JGFrBQzLcomw9i11W7UI/p04XcX63 +h8U/+s6NRDyTt0/YehzSansajEYFbOzXgrllDVYqxAZZ82xrr2TtlZ/OnFbWPZ5yhEW 5sbarfXlMJuy2XhCUkXtxIgEtuhU6b1nt+NkkKpq5n/4WDx9T9aeTIUsA7a6SbQVPJK9 2lljG1KDAIsLReZ/DjihuXPkNJ4S4goDGoP+gksh3TAoQfx9RvV0XceXuw9OV31GnQf4 5Fxax/VzQ6l5MDhOmnijpGoEqjzB25yyM1SqTl42mF037kWOIFmv/FXLX7zyLuumEpG4 boCQ== X-Forwarded-Encrypted: i=1; AJvYcCVbGtqz+GWvIKYEfZe6FNdTLoJSIdlkQxnCcEAN6qkHB6NVcdG8MR9DelZQwAu+xK5JEo5KNAVtgNgDjmxTzr64oHe+GjHd5agnb9fiGPdBWGhI1pI= X-Gm-Message-State: AOJu0YxuP+6xJub/zTZ3njHPeV+3FcvSo+5HCMX0e1HchzlY3KezRKEX IpS5/jbAXI9MSafl5bIYrOhRzO00Lls+eh95+9YVc90G2lFP+cWZmBRI3YF7Hw== X-Google-Smtp-Source: AGHT+IGUk7F34auoiq/zONzAUqrqK5yTPvc/Cyz94Sk8XJVQJ4h13ALDlS5aFFnC8XNMPBZjW49Tng== X-Received: by 2002:a05:6214:258b:b0:6a0:9361:f988 with SMTP id fq11-20020a056214258b00b006a09361f988mr2350953qvb.30.1714568897459; Wed, 01 May 2024 06:08:17 -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 l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:16 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:11 +0000 Subject: [PATCH v2 3/5] media: intel/ipu6: Switch to RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-3-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@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-20240501_060820_324884_2E965038 X-CRM114-Status: GOOD ( 14.15 ) 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index 4b1f69d14d71..7bcd9c5a381a 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -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 Wed May 1 13:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13650751 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 31499C10F1A for ; Wed, 1 May 2024 13:08:44 +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=KXiDRhlkiiprFla30yRzY/Y98EFMcafYolRBWTWCy/U=; b=a5pt2Kmmu7RdP+ u8+4HMb5zHwJnO8/2sYc1lsjpLs0abWCGj7J8XijKMgMRIytSebWpqPDM50acBHHvuc7LXhuEtMb3 mbtWFu3hi1Ne0229Fx938OUSRvjssdxjOCO1A7/Ko9rtNMx+PVLhWuWtqR26dnZMBtoTLD4XfrL50 sB7QgH8ZjQIZ712Jhw2B5y7f3agvsTKjR0+ue6vuRC3DINDJt1V2J11HO41Zp9vRrC1kuUX4YaW0h ml1lc2ekVoyLnp0unk6pMup2sRX7xIe6CJbAPMPSqEwhYMvLO5YiryFHKxpMoqCPAIWEd7EqvQKxh YOebpUDz1amZDSMG5c1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29hH-00000009dmF-1GaP; Wed, 01 May 2024 13:08:31 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29h6-00000009del-1vBu for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 13:08:22 +0000 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-69b4454e2f1so30058386d6.0 for ; Wed, 01 May 2024 06:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568898; x=1715173698; 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=iJYWApOjcQI3DrHx79IErrCVRj1fLUdwiqYEPr5bQYw=; b=iouF7BJA3CGDj8X8SzToJDqb+BoF3YnII9KioEUGl9C/ht9Sfdy+3C2hZYIoin1P0h 5bpies2skj5wAbB58kqkMeOb4fs3kchSxtshrTXeGZ2LfzXObF2ZL+GcRrirfyJllI6M GSPKpuzGUh6OHemXoq+EirVXQC04pYuFQrgbU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568898; x=1715173698; 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=iJYWApOjcQI3DrHx79IErrCVRj1fLUdwiqYEPr5bQYw=; b=KkpxGeNCASqqkPLStYwEDV4uq+A0G5nHx8Z7dTuA6D9cyMzvjPaUGzJdm7CxXrAPl+ MsRcXOYOoHWWQnLYS4lbwFy4GYDb1NZSExEpROjc4XiH5COfpsL6TDI/5JFYFLFi3H7p 3kg5pTn6DV7a0vgrYIpvXKl76a6k4Gv/1u8wMs6xHvlYqQr9j3jyyGYNGQ81wrby5Zgz k11S1PUVsSrKjYPdPWZhGJ6QKacIVOl42YvBiQq2jxQyJM3H26QADg8H2A4HhlW+fAJE ddsaYxTDZy9iQgc77Pycjw3l0iQycAP7sL87MNTdtMZ+0AK5nwLiLM2EPyovKNLhSHKd youg== X-Forwarded-Encrypted: i=1; AJvYcCWpitRWBIBm7aR/7CGpxbVXKuJU9n52lMejFLd/tEoXJAZFBMdFusuB/OZ3ouFo3KxvDmrrwTCwGL1z53nIstVlNHT8zH+xXKdlbNPpdoOeIdqgajk= X-Gm-Message-State: AOJu0YzPRkyed1tKNnCXa6e7Y9UYuxL44fo5S8eVvIEz7MQm0m0gioDn Sic1SHoCNEsJl2Euca4HLKSF6nGgcHQVV2RZUqkU2KJYg25g9vMlY0kpnWSfLw== X-Google-Smtp-Source: AGHT+IFO+hJ+WIBkK0RGSj2Imq1aY8WSC2eYIFUm01h6JFLPZZsleUnwhnZo+GaOxy6bd3ozLRUOHg== X-Received: by 2002:a05:6214:21e8:b0:6a0:cd98:5ad2 with SMTP id p8-20020a05621421e800b006a0cd985ad2mr3144776qvj.58.1714568898113; Wed, 01 May 2024 06:08:18 -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 l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:17 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:12 +0000 Subject: [PATCH v2 4/5] media: intel/ipu6: Fix direct dependency Kconfig error MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-4-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@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-20240501_060820_659477_43231A93 X-CRM114-Status: GOOD ( 12.56 ) 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 Wed May 1 13:08:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13650750 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 71C06C4345F for ; Wed, 1 May 2024 13:08: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=jiO2MJI8KDhtgz6gvbk7tF9iY/6BcJKkx2e61xwzWIE=; b=RJmhyXbKeDiRdH +l1b2+fLQKYT5Maf8tRViVRoSVrfA9cuMmGxNMzoLOMz+epBLXBDXr7BPCcyznaaNoDEzqIar8LRF B4G5ysoFDfVL8Q4XPjh11kKDH2yATHV5iF3WmrJW/cfVazFIczD0NXqSUUSJdGWwcpUo0raUigijz EUAEONgg1Ox61y9wWe6+fH4U31g+DGinX3MgOWbZ+/rQhssmvSuqq3lUX9cbvPI8X0WmARAQgy0aq x3FrDLSHJNtW/dKQyfPIcf6BoMLNAZnQ4q4f4+pDqpVsJiSogDh5FKBNIGkZPyzy6sz0w8ayEAa/D cPYwspY1R/CgdRaaBj3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29hI-00000009dnA-1Lar; Wed, 01 May 2024 13:08:32 +0000 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29h6-00000009dfT-1rla for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 13:08:22 +0000 Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-69b6c2e9ed9so31819606d6.1 for ; Wed, 01 May 2024 06:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568899; x=1715173699; 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=fuTS2475wBKHSkCVqPTkc/u+zH5CwzTowAsuQdTWDz8=; b=OHbn8MgNUWlJPZoxk6f78m94Ja630KZKtkOYBqqHCSKKPSe/PolwyN+nCZD+bk6GjY CM3I2H+YSL4E07bar/BZh6d238ejp2F5r7ErCxGIcm4PhfeGOk3C55DhdSm/6HqXKEaI NV0Qmv7xvGeAz4YTt5CG2OQaaoKetfDG44wEA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568899; x=1715173699; 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=fuTS2475wBKHSkCVqPTkc/u+zH5CwzTowAsuQdTWDz8=; b=dLX6HxxxGr4lp6JBWWPpfXl7TcLXKhlBGHtXc/VX48npdEwvbxwTn0IjMlIJfzOBRc eH76NoGWjK4dQppkWCn64OmYML5JapcQ/zYOZ6GUdxewZH0bjs+jqUYYbTcTzhfIM8ud 74OWp2QNmyALhYxzoJrHXAFlfmbkwxV/YSpW1PsY/jRNz2l6rPe2o1xb2xjhXmuGDb22 Mc/TEfenxBznOBSEfxWergH0rhLAqXYkwY60YU5VFjOgd++JZ85hnkHOHINnxHT8bSAi TlG+jUeMkNA2RiT5oH0pRaMVeBFZ42jH/OhE7dGBwUcvZ0tKibnYDM1jVzRZDzysOWne Cx0A== X-Forwarded-Encrypted: i=1; AJvYcCVhoVqGB2CZQOwMpBnb1MbL9ZzE70TEcWBpN4uTgga8C4qPeovqoIhsqLI2B2BkYhvOsVlbtOi2XlBKaNjdghKYN/yEZaEmZQwwf2D3L4DjSblnTXA= X-Gm-Message-State: AOJu0YyYB3ow/I6YFct6SiIfVEl2oywBuSkQ9ZDJyvdK7mzVO2HvTbsb WDGlZeghGZ/4uaNWQep4QsCLv8SoLbHFOHljNW/Q3se+Ndm/FjNVHXtn4CTcVA== X-Google-Smtp-Source: AGHT+IGxtLuMsV5IT224KA2ifYps0IBof8gR94o8Jv8PY5+SVS3jtjRCG5zyAZxhnmApUmcG9XpHAg== X-Received: by 2002:ad4:5cc7:0:b0:6a0:c933:4d7d with SMTP id iu7-20020ad45cc7000000b006a0c9334d7dmr2626974qvb.48.1714568899557; Wed, 01 May 2024 06:08:19 -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 l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:18 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:13 +0000 Subject: [PATCH v2 5/5] media: intel/ipu6: Fix build with !ACPI MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-5-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@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-20240501_060820_707121_0F005FF2 X-CRM114-Status: GOOD ( 23.05 ) 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);