Message ID | 20230202210312.544277-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp474994wrn; Thu, 2 Feb 2023 13:10:13 -0800 (PST) X-Google-Smtp-Source: AK7set9SPCogDZU8rJMSZMKszBuBoD469+RUAQ9rVahj89lugodbRQ+8ghfc9Szmkpl3425UdbSh X-Received: by 2002:a05:6a00:88f:b0:592:5276:95df with SMTP id q15-20020a056a00088f00b00592527695dfmr8279633pfj.2.1675372212691; Thu, 02 Feb 2023 13:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675372212; cv=none; d=google.com; s=arc-20160816; b=OGOSOcXMuaTvMQmIRPJf5EaYbpuT1vyVQVvB1DMfBYzt/78ce+xr5cm4KFGbbPakf6 5K+QIofXCLlul66VH0VPxn1ExXub+NwMqCJOTk7ajeVMmZstKIOL59nLBAeIFaZYlgyh vS8hxE3arzoimcWKUcOtp7Pi2O9G9T2CLFvASf6sLJY9SSjOK5jiDdQfWzoVsyAM7cRP bF6109EUO/YYTCjSvvLuNuM1tfbcy/45gK+K+ZYoWk13rkjmWbw0Cd5drIQ10XZ8GNYb 9q7CzoeBXFYH+HU+fjkUU/yXJ3OshYkY5ltNGru5whsrfd8oPZJhU3nNdPkbvO/099VV tE7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eKL5YQquut4TMIYtttVvt3kRvrU0YxIyfS5b2KV0jL4=; b=Gi5wxdt0GyZlULbfJUjcjdn/5olBUXLsmsrsaSDyYtAgd5knf9OZJwYZ/7+QaCvlkV 5fUyFHIS1cTnz9esudX7XIFmPjtX1Ou07aJLrH3mwsaYC7SGUFKVmBi76DJQPJ+2K3Ts Z86ZnxL6APE8EiJUY9ZyCLMuYwhY0ppNRtvUaV36ay33nBYBq88pLsAhpntcMGR2VpTb LK4/WCwocChG1g+W14nRhfBLruHobj9evdqWhR00/5Mz1Lb2N0kfgeq879V1ibKBKpXa 42+C55gpo4MOlIdVNqc1EKkWa/Mss9rSvGoDd+7ahtZxuw4Z0keHW5sOLhfms6epNWBI TQcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j1BeKWnK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f126-20020a623884000000b00593b41fd990si339101pfa.133.2023.02.02.13.10.00; Thu, 02 Feb 2023 13:10:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j1BeKWnK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233112AbjBBVDV (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Thu, 2 Feb 2023 16:03:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232893AbjBBVDT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Feb 2023 16:03:19 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C25CA34009; Thu, 2 Feb 2023 13:03:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 796ACB8286C; Thu, 2 Feb 2023 21:03:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E047C433EF; Thu, 2 Feb 2023 21:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675371795; bh=A33USs9k6Lfq5Tg1eM1boXA3NuS4YVVHeJBpBXs1Vws=; h=From:To:Cc:Subject:Date:From; b=j1BeKWnKWKFOU6FlZ7CQZ4keM+0/D46kDC+UZexBtfbb/DA0juNOo0ic7qBwPcOgM zgEBDQ1nxiiXKVzvpsX3PpTLnvHd8U1mCpLSTzgBgIM75mcB/l3sHEGilEb2iK/dMg hX0RzGvUN+sfJS5DUmSkAauOLNb2M5GzB3wnGEMk1GLQZgXqYdfEm60n45JOl83fMR b9tTUmdxRMJ0UOfy573k/8/xo5kql4mair2mmA2TKCy1kMTlCzRuheImeg+I61tgda lBYuh2FakFS9OLxnNOT2YQNtUl5i60zr1AyyKe0x5iIiiUePWy5f3M16UewInV4ow1 T9mG+uWRdAqhA== From: Arnd Bergmann <arnd@kernel.org> To: Hans de Goede <hdegoede@redhat.com>, Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de>, Sakari Ailus <sakari.ailus@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] media: atomisp: add I2C dependency Date: Thu, 2 Feb 2023 22:02:54 +0100 Message-Id: <20230202210312.544277-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756755093271858577?= X-GMAIL-MSGID: =?utf-8?q?1756755093271858577?= |
Series |
media: atomisp: add I2C dependency
|
|
Commit Message
Arnd Bergmann
Feb. 2, 2023, 9:02 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> Without CONFIG_I2C, atomisp fails to build because of a missing function declaration: drivers/staging/media/atomisp/pci/atomisp_v4l2.c: In function 'atomisp_subdev_probe': drivers/staging/media/atomisp/pci/atomisp_v4l2.c:960:21: error: implicit declaration of function 'i2c_get_adapter'; did you mean 'i2c_get_adapdata'? [-Werror=implicit-function-declaration] 960 | i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id); | ^~~~~~~~~~~~~~~ | i2c_get_adapdata Ideally the driver should just move away from calling i2c_get_adapter as explained in a comment near the call. For now, just use a Kconfig dependency. Apparently configurations with I2C disabled are rare in practice as well as in randconfig builds because a lot of other drivers 'select' the subsystem. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/staging/media/atomisp/Kconfig | 1 + 1 file changed, 1 insertion(+)
Comments
Hi Arnd, On 2/2/23 22:02, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Without CONFIG_I2C, atomisp fails to build because of a missing > function declaration: > > drivers/staging/media/atomisp/pci/atomisp_v4l2.c: In function 'atomisp_subdev_probe': > drivers/staging/media/atomisp/pci/atomisp_v4l2.c:960:21: error: implicit declaration of function 'i2c_get_adapter'; did you mean 'i2c_get_adapdata'? [-Werror=implicit-function-declaration] > 960 | i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id); > | ^~~~~~~~~~~~~~~ > | i2c_get_adapdata > > Ideally the driver should just move away from calling i2c_get_adapter > as explained in a comment near the call. For now, just use a Kconfig > dependency. Apparently configurations with I2C disabled are rare in > practice as well as in randconfig builds because a lot of other > drivers 'select' the subsystem. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Actually the i2c_get_adapter() call is gone in the atomisp pull-req which I send to Mauro for 6.3, it is removed by this patch. https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/commit/?h=media-atomisp-6.3-1&id=4f205ce7a915ffa4ae0fb24f48714604d39baa29 So adding the I2C dependency is no longer necessary. Regards, Hans > --- > drivers/staging/media/atomisp/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig > index c9bff98e5309..8b0de0b5b4a3 100644 > --- a/drivers/staging/media/atomisp/Kconfig > +++ b/drivers/staging/media/atomisp/Kconfig > @@ -13,6 +13,7 @@ config VIDEO_ATOMISP > tristate "Intel Atom Image Signal Processor Driver" > depends on VIDEO_DEV && INTEL_ATOMISP > depends on PMIC_OPREGION > + depends on I2C > select IOSF_MBI > select VIDEOBUF2_VMALLOC > select VIDEO_V4L2_SUBDEV_API
On Thu, Feb 2, 2023, at 22:34, Hans de Goede wrote: > On 2/2/23 22:02, Arnd Bergmann wrote: > > Actually the i2c_get_adapter() call is gone in the atomisp pull-req > which I send to Mauro for 6.3, it is removed by this patch. > > https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/commit/?h=media-atomisp-6.3-1&id=4f205ce7a915ffa4ae0fb24f48714604d39baa29 > > So adding the I2C dependency is no longer necessary. Ok, nice timing then, I must have done thousands of randconfig builds with atomisp enabled without ever hitting it until today ;-) Arnd
diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig index c9bff98e5309..8b0de0b5b4a3 100644 --- a/drivers/staging/media/atomisp/Kconfig +++ b/drivers/staging/media/atomisp/Kconfig @@ -13,6 +13,7 @@ config VIDEO_ATOMISP tristate "Intel Atom Image Signal Processor Driver" depends on VIDEO_DEV && INTEL_ATOMISP depends on PMIC_OPREGION + depends on I2C select IOSF_MBI select VIDEOBUF2_VMALLOC select VIDEO_V4L2_SUBDEV_API