From patchwork Thu Apr 4 07:39:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 10885175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F18401708 for ; Thu, 4 Apr 2019 07:40:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9A602894E for ; Thu, 4 Apr 2019 07:40:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC99E289F8; Thu, 4 Apr 2019 07:40:34 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 16184289F7 for ; Thu, 4 Apr 2019 07:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbfDDHkd (ORCPT ); Thu, 4 Apr 2019 03:40:33 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:34887 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbfDDHkd (ORCPT ); Thu, 4 Apr 2019 03:40:33 -0400 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBwyz-0007cw-OS; Thu, 04 Apr 2019 09:40:21 +0200 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hBwyv-00051J-6m; Thu, 04 Apr 2019 09:40:17 +0200 From: Marco Felsch To: mchehab@kernel.org, rmfrfs@gmail.com, zhengsq@rock-chips.com, prabhakar.csengg@gmail.com, corbet@lwn.net, wenyou.yang@microchip.com, lkundrak@v3.sk, hverkuil-cisco@xs4all.nl, sakari.ailus@linux.intel.com, jacopo+renesas@jmondi.org Cc: linux-media@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 0/6] Avoid v4l2_subdev_get_try_ ifdef dance Date: Thu, 4 Apr 2019 09:39:56 +0200 Message-Id: <20190404074002.18730-1-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org 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 Hi, during my work on [1] I prepared a patch to avoid driver interal ifdef dances for: - v4l2_subdev_get_try_format - v4l2_subdev_get_try_crop - v4l2_subdev_get_try_compose helper functions. Jacopo did some comments on it so I picked Lubomir's series [2] as base and prepared a new one since this series didn't got merged. During discussion on [2] Sakari mentioned Hans RFC Patch [3] which didn't got merged too due to Mauro's concerns. The driver changes are only compile tested due to the lack of missing hardware. It would be cool if someone can verify my changes. [1] https://patchwork.kernel.org/cover/10786553/ [2] https://patchwork.kernel.org/patch/10703029/ [3] https://patchwork.linuxtv.org/patch/53370/ Marco Felsch (6): media: v4l2-subdev: add stubs for v4l2_subdev_get_try_* media: ov2659: get rid of extra ifdefs media: ov2680: get rid of extra ifdefs media: ov5695: get rid of extra ifdefs media: ov7670: get rid of extra ifdefs media: ov7740: get rid of extra ifdefs drivers/media/i2c/ov2659.c | 15 +++++++-------- drivers/media/i2c/ov2680.c | 20 +++++++++----------- drivers/media/i2c/ov5695.c | 26 ++++++++++++++------------ drivers/media/i2c/ov7670.c | 19 +++++++------------ drivers/media/i2c/ov7740.c | 27 +++++++++++++-------------- include/media/v4l2-subdev.h | 29 ++++++++++++++++++++++++++++- 6 files changed, 78 insertions(+), 58 deletions(-)