From patchwork Thu Mar 24 08:00:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 553969 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC4ADC433F5 for ; Thu, 24 Mar 2022 08:01:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348766AbiCXIDA (ORCPT ); Thu, 24 Mar 2022 04:03:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348780AbiCXICx (ORCPT ); Thu, 24 Mar 2022 04:02:53 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651C799ED5 for ; Thu, 24 Mar 2022 01:01:22 -0700 (PDT) Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5D87714CD; Thu, 24 Mar 2022 09:01:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648108879; bh=rsVji2hD+87e+gDSymMZyQMGnzaMwO7BqmYRfTVlu5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8xlOJ9Ga8NHejdWZOOQdKoWw9wUm45zuGjmqyxnRtrQ9fSUMJ29ij8FZRT42waod n/CxJIcc/YX5PzywfPIkzxTzzggwKcjgLgkzYzcNf3fCal2qqTvhYZ0VEeR0940Izx zKrN+j4pxb1RUC6R4DbxbN7SZsAOFIOmjRFzHYTw= From: Tomi Valkeinen To: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, Jacopo Mondi , Laurent Pinchart , niklas.soderlund+renesas@ragnatech.se, Mauro Carvalho Chehab , Hans Verkuil , Pratyush Yadav Cc: Tomi Valkeinen Subject: [PATCH v6 3/8] media: subdev: add v4l2_subdev_get_pad_* helpers Date: Thu, 24 Mar 2022 10:00:25 +0200 Message-Id: <20220324080030.216716-4-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220324080030.216716-1-tomi.valkeinen@ideasonboard.com> References: <20220324080030.216716-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The subdev state is now used for both try and active cases. We should rename v4l2_subdev_get_try_* helpers to v4l2_subdev_get_pad_*, but due to the size of that change lets add temporary wrapper helpers which can be used in drivers that support active state. Signed-off-by: Tomi Valkeinen --- include/media/v4l2-subdev.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 1bbe4383966c..b9587a265b32 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -1042,6 +1042,16 @@ v4l2_subdev_get_try_compose(struct v4l2_subdev *sd, return &state->pads[pad].try_compose; } +/* Temprary helpers until v4l2_subdev_get_try_* functions have been renamed */ +#define v4l2_subdev_get_pad_format(sd, state, pad) \ + v4l2_subdev_get_try_format(sd, state, pad) + +#define v4l2_subdev_get_pad_crop(sd, state, pad) \ + v4l2_subdev_get_try_crop(sd, state, pad) + +#define v4l2_subdev_get_pad_compose(sd, state, pad) \ + v4l2_subdev_get_try_compose(sd, state, pad) + #endif extern const struct v4l2_file_operations v4l2_subdev_fops;