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 1E5DAC4167B for ; Tue, 7 Nov 2023 17:29:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343827AbjKGR3a (ORCPT ); Tue, 7 Nov 2023 12:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343664AbjKGR32 (ORCPT ); Tue, 7 Nov 2023 12:29:28 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CCF69C for ; Tue, 7 Nov 2023 09:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699378166; x=1730914166; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EfStQhuDfvS2uYwtQ50z+BmrJL4xum2c8+/UWX1DvD4=; b=hOLoGB2Kza2RmirLUG4ZC69P0vSAQ3NQWV5OyUFIVQ/6eIgaCdWg71TN 5FUbt4UwbuwbEM6FNkNDWyGZJ6bwjgbzajQtEj5joj2yys1MfNdpcpNrq 6f7swUv8IcdL8HOpcOYdQEBwFl3ylxuJC2YvWAftaExBq2Wn0Eex0XS+g xekrBUe/9xfmLyF5HHrp+QvT3sM6Ak7w+zjjeeUZnvkHVMKckVDCV7B+W WGGcHwH/DQGUKFGGdftHX+EjzCPSlG1Hgsca9Fjh0K8Djg/Q1m3ptvj+s 9vhRy43U3ggNB26hf/y9Lg5YzFss64Bf/4Nroy+B075SUlWXIvV64mzl9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="389368975" X-IronPort-AV: E=Sophos;i="6.03,284,1694761200"; d="scan'208";a="389368975" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2023 09:29:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="853441218" X-IronPort-AV: E=Sophos;i="6.03,284,1694761200"; d="scan'208";a="853441218" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2023 09:29:22 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 5257F1202A6; Tue, 7 Nov 2023 19:29:19 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, tomi.valkeinen@ideasonboard.com, jacopo.mondi@ideasonboard.com, bingbu.cao@intel.com, hongju.wang@intel.com, Alain Volmat Subject: [PATCH v7 7/8] media: v4l: subdev: Remove stream-unaware sub-device state access Date: Tue, 7 Nov 2023 19:29:00 +0200 Message-Id: <20231107172901.1302019-8-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107172901.1302019-1-sakari.ailus@linux.intel.com> References: <20231107172901.1302019-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove stream-unaware sub-device state access functions and macros. These are no longer used. Signed-off-by: Sakari Ailus [Sakari Ailus: Resolve a minor conflict in removed code.] Reviewed-by: Laurent Pinchart --- include/media/v4l2-subdev.h | 77 ------------------------------------- 1 file changed, 77 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 6b34a4afba77..b1bad946d813 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -1137,83 +1137,6 @@ struct v4l2_subdev_fh { #define to_v4l2_subdev_fh(fh) \ container_of(fh, struct v4l2_subdev_fh, vfh) -#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) - -/** - * v4l2_subdev_get_pad_format - ancillary routine to get - * &struct v4l2_subdev_pad_config->format - * - * @sd: pointer to &struct v4l2_subdev - * @state: pointer to &struct v4l2_subdev_state - * @pad: index of the pad in the &struct v4l2_subdev_state->pads array - */ -static inline struct v4l2_mbus_framefmt * -v4l2_subdev_get_pad_format(struct v4l2_subdev *sd, - struct v4l2_subdev_state *state, - unsigned int pad) -{ - if (WARN_ON(!state)) - return NULL; - if (WARN_ON(pad >= sd->entity.num_pads)) - pad = 0; - return &state->pads[pad].format; -} - -/** - * v4l2_subdev_get_pad_crop - ancillary routine to get - * &struct v4l2_subdev_pad_config->crop - * - * @sd: pointer to &struct v4l2_subdev - * @state: pointer to &struct v4l2_subdev_state. - * @pad: index of the pad in the &struct v4l2_subdev_state->pads array. - */ -static inline struct v4l2_rect * -v4l2_subdev_get_pad_crop(struct v4l2_subdev *sd, - struct v4l2_subdev_state *state, - unsigned int pad) -{ - if (WARN_ON(!state)) - return NULL; - if (WARN_ON(pad >= sd->entity.num_pads)) - pad = 0; - return &state->pads[pad].crop; -} - -/** - * v4l2_subdev_get_pad_compose - ancillary routine to get - * &struct v4l2_subdev_pad_config->compose - * - * @sd: pointer to &struct v4l2_subdev - * @state: pointer to &struct v4l2_subdev_state. - * @pad: index of the pad in the &struct v4l2_subdev_state->pads array. - */ -static inline struct v4l2_rect * -v4l2_subdev_get_pad_compose(struct v4l2_subdev *sd, - struct v4l2_subdev_state *state, - unsigned int pad) -{ - if (WARN_ON(!state)) - return NULL; - if (WARN_ON(pad >= sd->entity.num_pads)) - pad = 0; - return &state->pads[pad].compose; -} - -/* - * Temprary helpers until uses of v4l2_subdev_get_try_* functions have been - * renamed - */ -#define v4l2_subdev_get_try_format(sd, state, pad) \ - v4l2_subdev_get_pad_format(sd, state, pad) - -#define v4l2_subdev_get_try_crop(sd, state, pad) \ - v4l2_subdev_get_pad_crop(sd, state, pad) - -#define v4l2_subdev_get_try_compose(sd, state, pad) \ - v4l2_subdev_get_pad_compose(sd, state, pad) - -#endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */ - extern const struct v4l2_file_operations v4l2_subdev_fops; /** -- 2.39.2