Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: mc: Rename pad as origin in __media_pipeline_start()

Rename the pad field in __media_pipeline_start() to both better describe
what it is and avoid masking it during the loop.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Sakari Ailus and committed by
Hans Verkuil
ff0f0353 23e0661d

+12 -12
+7 -7
drivers/media/mc/mc-entity.c
··· 768 768 return ret; 769 769 } 770 770 771 - __must_check int __media_pipeline_start(struct media_pad *pad, 771 + __must_check int __media_pipeline_start(struct media_pad *origin, 772 772 struct media_pipeline *pipe) 773 773 { 774 - struct media_device *mdev = pad->graph_obj.mdev; 774 + struct media_device *mdev = origin->graph_obj.mdev; 775 775 struct media_pipeline_pad *err_ppad; 776 776 struct media_pipeline_pad *ppad; 777 777 int ret; ··· 782 782 * If the pad is already part of a pipeline, that pipeline must be the 783 783 * same as the pipe given to media_pipeline_start(). 784 784 */ 785 - if (WARN_ON(pad->pipe && pad->pipe != pipe)) 785 + if (WARN_ON(origin->pipe && origin->pipe != pipe)) 786 786 return -EINVAL; 787 787 788 788 /* ··· 799 799 * with media_pipeline_pad instances for each pad found during graph 800 800 * walk. 801 801 */ 802 - ret = media_pipeline_populate(pipe, pad); 802 + ret = media_pipeline_populate(pipe, origin); 803 803 if (ret) 804 804 return ret; 805 805 ··· 914 914 } 915 915 EXPORT_SYMBOL_GPL(__media_pipeline_start); 916 916 917 - __must_check int media_pipeline_start(struct media_pad *pad, 917 + __must_check int media_pipeline_start(struct media_pad *origin, 918 918 struct media_pipeline *pipe) 919 919 { 920 - struct media_device *mdev = pad->graph_obj.mdev; 920 + struct media_device *mdev = origin->graph_obj.mdev; 921 921 int ret; 922 922 923 923 mutex_lock(&mdev->graph_mutex); 924 - ret = __media_pipeline_start(pad, pipe); 924 + ret = __media_pipeline_start(origin, pipe); 925 925 mutex_unlock(&mdev->graph_mutex); 926 926 return ret; 927 927 }
+5 -5
include/media/media-entity.h
··· 1143 1143 1144 1144 /** 1145 1145 * media_pipeline_start - Mark a pipeline as streaming 1146 - * @pad: Starting pad 1146 + * @origin: Starting pad 1147 1147 * @pipe: Media pipeline to be assigned to all pads in the pipeline. 1148 1148 * 1149 - * Mark all pads connected to a given pad through enabled links, either 1149 + * Mark all pads connected to pad @origin through enabled links, either 1150 1150 * directly or indirectly, as streaming. The given pipeline object is assigned 1151 1151 * to every pad in the pipeline and stored in the media_pad pipe field. 1152 1152 * ··· 1155 1155 * pipeline pointer must be identical for all nested calls to 1156 1156 * media_pipeline_start(). 1157 1157 */ 1158 - __must_check int media_pipeline_start(struct media_pad *pad, 1158 + __must_check int media_pipeline_start(struct media_pad *origin, 1159 1159 struct media_pipeline *pipe); 1160 1160 /** 1161 1161 * __media_pipeline_start - Mark a pipeline as streaming 1162 1162 * 1163 - * @pad: Starting pad 1163 + * @origin: Starting pad 1164 1164 * @pipe: Media pipeline to be assigned to all pads in the pipeline. 1165 1165 * 1166 1166 * ..note:: This is the non-locking version of media_pipeline_start() 1167 1167 */ 1168 - __must_check int __media_pipeline_start(struct media_pad *pad, 1168 + __must_check int __media_pipeline_start(struct media_pad *origin, 1169 1169 struct media_pipeline *pipe); 1170 1170 1171 1171 /**