From patchwork Wed Jan 10 17:00:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10155697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC658605BA for ; Wed, 10 Jan 2018 17:00:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCA57284AF for ; Wed, 10 Jan 2018 17:00:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB6782852E; Wed, 10 Jan 2018 17:00:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F37C6285C4 for ; Wed, 10 Jan 2018 17:00:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965907AbeAJRAj (ORCPT ); Wed, 10 Jan 2018 12:00:39 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:33767 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754278AbeAJRAg (ORCPT ); Wed, 10 Jan 2018 12:00:36 -0500 Received: by mail-ot0-f193.google.com with SMTP id x15so14841184ote.0 for ; Wed, 10 Jan 2018 09:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=wDA1tHZyGed6s6I/zXC/pkRuUCBQ/Fite8+m3QpD3qs=; b=HbeXkIWUdnaCmwB2kiEnpoWbxB2Xlmh8N6ZlmRgnox+rDynuVGnD5hNrPzUpDbYZ+w M6xSIUPr7CYFsJajLFfJpNnmv6xmRMPdmgLqrYsSC7AXaKbBAeCT2ti9b+dLWMGrSO/w HN0C2NPfbbfpJoJT3oEQ63uYbQUXAEEZFuHJJPt0thv/z3bOfokde3myM/yAIkuak6Wt gLBHqLbGldlCpGAvFKdoY+H7oQAGJrdln1sD3JYSnWqvnUUxp0MEMDJgDF6DWEBsDZ/j SLMLbOB0UxExUrXeTCqb3bKNplXJ0Wl3FBR9eWw2Y7A8YYxr6iEdxmvQ5dCzqSvYwGhT e3kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=wDA1tHZyGed6s6I/zXC/pkRuUCBQ/Fite8+m3QpD3qs=; b=TMqtMhVVyyTceu1vEiSvEWERXtIThana9ZK6vkkVR3WxH4siMAgIrq/sWH9HH2Ng30 1Ot61cNcFqM67c6D0Bub3pSi8tOWfOGP/l9y41iRHg8Y51iOFjpnxW2au7zUBAN5Cy// Gb5+MuKQDf1BrwIjap3lQDA00uUQV4R3V0olWHoNuabqvQOS7r6PCKBxSzQIE6w29zP9 gc/BtEsQyDgoUyEIVPmVjZYQWnVUeMMSa7yJgwLGNyDphQAxKkIxtejL72zPcf1S9b19 H44DiiLPqyIYuCON3Qy2uZduRoHxaUsVgqPKjKFgDBYijIFDxUjBVeVclsjsFjdZqXNe WyWw== X-Gm-Message-State: AKwxyteJvvHAuhQHRxcicbd9tuRzRw9cyjyTF6dKDQI9QHvy0H1KK6Xz IA/Wa/1+rNBNy0BlKgKKFZ6gcJ+XEWkOzW8n6fI= X-Google-Smtp-Source: ACJfBovaVayrDn/ebwj2IUZmgNNcZe5blCwr+uN9/R9ZPaRSkE7O6ziLaO/hNgzs+uSecNuoKUtPD0coHtB9vS3wWSs= X-Received: by 10.157.67.90 with SMTP id y26mr5210909oti.229.1515603635787; Wed, 10 Jan 2018 09:00:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.2.226 with HTTP; Wed, 10 Jan 2018 09:00:35 -0800 (PST) In-Reply-To: <20180109223141.55p7bv4klcsyqet4@kekkonen.localdomain> References: <20180109135858.1964-1-sakari.ailus@linux.intel.com> <20180109223141.55p7bv4klcsyqet4@kekkonen.localdomain> From: Arnd Bergmann Date: Wed, 10 Jan 2018 18:00:35 +0100 X-Google-Sender-Auth: 6S8yf26omVAKqLiDLh3iIzK2c40 Message-ID: Subject: Re: [PATCH 1/1] media: entity: Add a nop variant of media_entity_cleanupr To: Sakari Ailus Cc: Linux Media Mailing List , Wenyou Yang , Hans Verkuil , Pavel Machek Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jan 9, 2018 at 11:31 PM, Sakari Ailus wrote: >> depends on VIDEO_V4L2_SUBDEV_API >> ---help--- >> This is a driver for the DW9714 camera lens voice coil. >> @@ -636,7 +636,6 @@ config VIDEO_OV5670 >> tristate "OmniVision OV5670 sensor support" >> depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API >> depends on MEDIA_CAMERA_SUPPORT >> - depends on MEDIA_CONTROLLER > > ov5670 does depend on MC at least right now. I guess it might not take much > to make it optional. But it's more than this patch. :-) > >> select V4L2_FWNODE >> ---help--- >> This is a Video4Linux2 sensor-level driver for the OmniVision >> @@ -667,7 +666,7 @@ config VIDEO_OV7670 >> >> config VIDEO_OV7740 >> tristate "OmniVision OV7740 sensor support" >> - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER >> + depends on I2C && VIDEO_V4L2 > > Hmm. In here the ov7740 driver doesn't seem to depend on MC. Right, this was on top of the earlier patch I sent that you rejected ;-) >> depends on MEDIA_CAMERA_SUPPORT >> ---help--- >> This is a Video4Linux2 sensor-level driver for the OmniVision >> @@ -815,7 +814,7 @@ comment "Flash devices" >> >> config VIDEO_ADP1653 >> tristate "ADP1653 flash support" >> - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER >> + depends on I2C && VIDEO_V4L2 >> depends on MEDIA_CAMERA_SUPPORT >> ---help--- >> This is a driver for the ADP1653 flash controller. It is used for >> @@ -823,7 +822,7 @@ config VIDEO_ADP1653 >> >> config VIDEO_LM3560 >> tristate "LM3560 dual flash driver support" >> - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER >> + depends on I2C && VIDEO_V4L2 >> depends on MEDIA_CAMERA_SUPPORT >> select REGMAP_I2C >> ---help--- Those two also failed to build >> @@ -832,7 +831,7 @@ config VIDEO_LM3560 >> >> config VIDEO_LM3646 >> tristate "LM3646 dual flash driver support" >> - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER >> + depends on I2C && VIDEO_V4L2 >> depends on MEDIA_CAMERA_SUPPORT >> select REGMAP_I2C >> ---help--- > > These also call media_entity_pads_init() unconditionally. > > How was this tested? :-) Not before I sent it, what I meant is that I'd give it a try, blindly applying the patch to my randconfig build tree to see what breaks. The result after a day worth of randconfig builds is this one, which basically matches what you concluded already: * I'll just drop that patch then from my build tree. Arnd diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 03cf3a1a1e06..5d465221fbfa 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -310,14 +310,14 @@ config VIDEO_ML86V7667 config VIDEO_AD5820 tristate "AD5820 lens voice coil support" - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER + depends on I2C && VIDEO_V4L2 ---help--- This is a driver for the AD5820 camera lens voice coil. It is used for example in Nokia N900 (RX-51). config VIDEO_DW9714 tristate "DW9714 lens voice coil support" - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER + depends on I2C && VIDEO_V4L2 depends on VIDEO_V4L2_SUBDEV_API ---help--- This is a driver for the DW9714 camera lens voice coil. @@ -636,7 +636,6 @@ config VIDEO_OV5670 tristate "OmniVision OV5670 sensor support" depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on MEDIA_CAMERA_SUPPORT - depends on MEDIA_CONTROLLER select V4L2_FWNODE ---help--- This is a Video4Linux2 sensor-level driver for the OmniVision @@ -667,7 +666,7 @@ config VIDEO_OV7670 config VIDEO_OV7740 tristate "OmniVision OV7740 sensor support" - depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER + depends on I2C && VIDEO_V4L2 depends on MEDIA_CAMERA_SUPPORT ---help--- This is a Video4Linux2 sensor-level driver for the OmniVision diff --git a/include/media/media-entity.h b/include/media/media-entity.h index d7a669058b5e..3f34a1126bd1 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -636,6 +636,11 @@ int media_entity_pads_init(struct media_entity *entity, u16 num_pads, */ static inline void media_entity_cleanup(struct media_entity *entity) {}; +#ifndef CONFIG_MEDIA_CONTROLLER +#define media_entity_pads_init(e, n, p) 0 +#define media_entity_cleanup(e) do { } while (0) +#endif + /** * media_create_pad_link() - creates a link between two entities.