Hi Sebastian, On Thu, 2017-05-04 at 16:21 +0200, Sebastian Reichel wrote: > Hi, > > On Thu, May 04, 2017 at 03:38:57PM +0200, Philipp Zabel wrote: > > This driver can handle SoC internal and external video bus multiplexers, > > controlled by mux controllers provided by the mux controller framework, > > such as MMIO register bitfields or GPIOs. The subdevice passes through > > the mbus configuration of the active input to the output side. > > > > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> > > Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> > > Signed-off-by: Steve Longerbeam <steve_longerbeam@xxxxxxxxxx> > > --- > > Changes since v2 [1]: > > - Extend vmux->lock to protect mbus format against simultaneous access > > from get/set_format calls. > > - Drop is_source_pad(), check pad->flags & MEDIA_PAD_FL_SOURCE directly. > > - Replace v4l2_of_parse_endpoint call with v4l2_fwnode_endpoint_parse, > > include media/v4l2-fwnode.h instead of media/v4l2-of.h. > > - Constify ops structures. > > > > This was previously sent as part of Steve's i.MX media series [2]. > > Tested against > > https://git.linuxtv.org/sailus/media_tree.git/log/?h=v4l2-acpi-merge > > > > [1] https://patchwork.kernel.org/patch/9708237/ > > [2] https://patchwork.kernel.org/patch/9647869/ > > Looks fine to me. Just one nitpick: > > > +static int video_mux_probe(struct platform_device *pdev) > > +{ > > [...] > > > + vmux->pads = devm_kzalloc(dev, sizeof(*vmux->pads) * num_pads, > > + GFP_KERNEL); > > + vmux->format_mbus = devm_kzalloc(dev, sizeof(*vmux->format_mbus) * > > + num_pads, GFP_KERNEL); > > + vmux->endpoint = devm_kzalloc(dev, sizeof(*vmux->endpoint) * > > + (num_pads - 1), GFP_KERNEL); > > devm_kcalloc(dev, num_pads, sizeof(*foo), GFP_KERNEL). thank you, I'll fix this. regards Philipp