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

Configure Feed

Select the types of activity you want to include in your feed.

media: subdev: Minor v4l2_subdev_get_frame_desc_passthrough() cleanups

Minor code cleanups, no functional change.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Tomi Valkeinen and committed by
Hans Verkuil
f40306e0 754ec1f1

+4 -6
+4 -6
drivers/media/v4l2-core/v4l2-subdev.c
··· 2549 2549 unsigned int pad, 2550 2550 struct v4l2_mbus_frame_desc *fd) 2551 2551 { 2552 - const struct media_pad *pads = sd->entity.pads; 2553 2552 struct media_pad *local_sink_pad; 2554 2553 struct v4l2_subdev_route *route; 2555 2554 struct v4l2_subdev_state *state; 2556 2555 struct device *dev = sd->dev; 2557 2556 int ret = 0; 2558 2557 2559 - if (WARN_ON(!(pads[pad].flags & MEDIA_PAD_FL_SOURCE))) 2558 + if (WARN_ON(!(sd->entity.pads[pad].flags & MEDIA_PAD_FL_SOURCE))) 2560 2559 return -EINVAL; 2561 2560 2562 2561 state = v4l2_subdev_lock_and_get_active_state(sd); ··· 2576 2577 struct v4l2_mbus_frame_desc_entry *source_entry = NULL; 2577 2578 struct media_pad *remote_source_pad; 2578 2579 struct v4l2_subdev *remote_sd; 2579 - unsigned int i; 2580 2580 2581 2581 if (route->source_pad != pad || 2582 2582 route->sink_pad != local_sink_pad->index) ··· 2620 2622 } 2621 2623 } 2622 2624 2623 - for (i = 0; i < source_fd.num_entries; i++) { 2625 + for (unsigned int i = 0; i < source_fd.num_entries; i++) { 2624 2626 if (source_fd.entry[i].stream == route->sink_stream) { 2625 2627 source_entry = &source_fd.entry[i]; 2626 2628 break; ··· 2628 2630 } 2629 2631 2630 2632 if (!source_entry) { 2631 - dev_dbg(sd->dev, 2633 + dev_dbg(dev, 2632 2634 "Failed to find stream %u from source frame desc\n", 2633 2635 route->sink_stream); 2634 2636 ret = -EPIPE; ··· 2636 2638 } 2637 2639 2638 2640 if (fd->num_entries >= V4L2_FRAME_DESC_ENTRY_MAX) { 2639 - dev_dbg(sd->dev, "Frame desc entry limit reached\n"); 2641 + dev_dbg(dev, "Frame desc entry limit reached\n"); 2640 2642 ret = -ENOSPC; 2641 2643 goto out_unlock; 2642 2644 }