1. 06 6月, 2017 5 次提交
  2. 19 5月, 2017 1 次提交
    • M
      [media] media drivers: annotate fall-through · 06eeefe8
      Mauro Carvalho Chehab 提交于
      Avoid warnings like those:
      
      drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_detach':
      drivers/media/pci/ddbridge/ddbridge-core.c:787:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (input->fe) {
            ^
      drivers/media/pci/ddbridge/ddbridge-core.c:792:2: note: here
        case 4:
        ^~~~
      ...
      
      On several cases, it is just that gcc 7.1 is not capable of
      understanding the comment, but on other places, we need an
      annotation.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      06eeefe8
  3. 18 5月, 2017 1 次提交
    • P
      [media] pxa_camera: fix module remove codepath for v4l2 clock · e3b4d10c
      Petr Cvek 提交于
      The conversion from soc_camera omitted a correct handling of the clock
      gating for a sensor. When the pxa_camera driver module was removed it
      tried to unregister clk, but this caused a similar warning:
      
        WARNING: CPU: 0 PID: 6740 at drivers/media/v4l2-core/v4l2-clk.c:278
        v4l2_clk_unregister(): Refusing to unregister ref-counted 0-0030 clock!
      
      The clock was at time still refcounted by the sensor driver. Before
      the removing of the pxa_camera the clock must be dropped by the sensor
      driver. This should be triggered by v4l2_async_notifier_unregister() call
      which removes sensor driver module too, calls unbind() function and then
      tries to probe sensor driver again. Inside unbind() we can safely
      unregister the v4l2 clock as the sensor driver got removed. The original
      v4l2_clk_unregister() should be put inside test as the clock can be
      already unregistered from unbind(). If there was not any bound sensor
      the clock is still present.
      
      The codepath is practically a copy from the old soc_camera. The bug was
      tested with a pxa_camera+ov9640 combination during the conversion
      of the ov9640 from the soc_camera.
      Signed-off-by: NPetr Cvek <petr.cvek@tul.cz>
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      e3b4d10c
  4. 25 10月, 2016 1 次提交
  5. 21 10月, 2016 1 次提交
    • M
      [media] platform: don't break long lines · 759a4ed4
      Mauro Carvalho Chehab 提交于
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      759a4ed4
  6. 20 9月, 2016 2 次提交
  7. 19 9月, 2016 1 次提交
  8. 12 9月, 2016 1 次提交
    • H
      [media] pxa_camera: merge soc_mediabus.c into pxa_camera.c · 34b27b13
      Hans Verkuil 提交于
      Linking soc_mediabus into this driver causes multiple definition linker warnings
      if soc_camera is also enabled:
      
         drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_image_size+0x0): multiple definition of `__ksymtab_soc_mbus_image_size'
         drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_image_size+0x0): first defined here
      >> drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): multiple definition of `__ksymtab_soc_mbus_samples_per_pixel'
         drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): first defined here
         drivers/media/platform/soc_camera/built-in.o: In function `soc_mbus_config_compatible':
         (.text+0x3840): multiple definition of `soc_mbus_config_compatible'
         drivers/media/platform/soc_camera/soc_mediabus.o:(.text+0x134): first defined here
      
      Since we really don't want to have to use any of the soc-camera code this patch
      copies the relevant code and data structures from soc_mediabus and renames it to pxa_mbus_*.
      
      The large table of formats has been culled a bit, removing formats that are not supported
      by this driver.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      34b27b13
  9. 09 9月, 2016 13 次提交
  10. 24 8月, 2016 1 次提交
  11. 03 3月, 2016 4 次提交
  12. 19 11月, 2015 1 次提交
    • M
      [media] move media platform data to linux/platform_data/media · a71daaa1
      Mauro Carvalho Chehab 提交于
      Now that media has its own subdirectory inside platform_data,
      let's move the headers that are already there to such subdir.
      
      After moving those files, the references were adjusted using this
      script:
      
          MAIN_DIR="linux/platform_data/"
          PREV_DIR="linux/platform_data/"
          DIRS="media/"
      
          echo "Checking affected files" >&2
          for i in $DIRS; do
      	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
      		 n=`basename $j`
      		git grep -l $n
      	done
          done|sort|uniq >files && (
      	echo "Handling files..." >&2;
      	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done";
      	);
      	echo "Handling documentation..." >&2;
      	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done"
      	);
          ) >script && . ./script
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NMark Brown <broonie@kernel.org>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      a71daaa1
  13. 17 11月, 2015 1 次提交
    • M
      [media] include/media: move driver interface headers to a separate dir · d647f0b7
      Mauro Carvalho Chehab 提交于
      Let's not mix headers used by the core with those headers that
      are needed by some driver-specific interface header.
      
      The headers used on drivers were manually moved using:
          mkdir include/media/drv-intf/
          git mv include/media/cx2341x.h include/media/cx25840.h \
      	include/media/exynos-fimc.h include/media/msp3400.h \
      	include/media/s3c_camif.h include/media/saa7146.h \
      	include/media/saa7146_vv.h  include/media/sh_mobile_ceu.h \
      	include/media/sh_mobile_csi2.h include/media/sh_vou.h \
      	include/media/si476x.h include/media/soc_mediabus.h \
      	include/media/tea575x.h include/media/drv-intf/
      
      And the references for those headers were corrected using:
      
          MAIN_DIR="media/"
          PREV_DIR="media/"
          DIRS="drv-intf/"
      
          echo "Checking affected files" >&2
          for i in $DIRS; do
      	for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
      		 n=`basename $j`
      		git grep -l $n
      	done
          done|sort|uniq >files && (
      	echo "Handling files..." >&2;
      	echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done";
      	);
      	echo "Handling documentation..." >&2;
      	echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
      	(
      		cd include/$MAIN_DIR;
      		for j in $DIRS; do
      			for i in $(ls $j); do
      				echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
      			done;
      		done;
      		echo "cat > a && mv a \$i; done"
      	);
          ) >script && . ./script
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      d647f0b7
  14. 01 5月, 2015 4 次提交
  15. 22 1月, 2015 1 次提交
  16. 15 11月, 2014 1 次提交
  17. 04 9月, 2014 1 次提交