1. 28 6月, 2018 4 次提交
  2. 29 5月, 2018 1 次提交
  3. 07 3月, 2018 5 次提交
  4. 06 3月, 2018 1 次提交
  5. 26 2月, 2018 4 次提交
  6. 23 6月, 2017 1 次提交
  7. 15 4月, 2017 1 次提交
  8. 24 3月, 2017 1 次提交
    • B
      [media] media: i2c: soc_camera: constify v4l2_subdev_* structures · 6713c88f
      Bhumika Goyal 提交于
      v4l2_subdev_{core/video}_ops structures are stored in the
      fields of the v4l2_subdev_ops structure which are of type const.
      Also, v4l2_subdev_ops structure is passed to a function
      having its argument of type const. As these structures are never
      modified, so declare them as const.
      Done using Coccinelle: (One of the scripts used)
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct v4l2_subdev_video_ops i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct v4l2_subdev_ops obj;
      @@
      obj.video=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct v4l2_subdev_video_ops i;
      
      File sizes before and after the changes:
         text	   data	    bss	    dec	    hex	filename
      
         3459	    696	      0	   4155	   103b	/media/i2c/soc_camera/imx074.o
         3835	    320	      0	   4155	   103b	/media/i2c/soc_camera/imx074.o
      
         4749	   1048	      8	   5805	   16ad	/media/i2c/soc_camera/mt9m001.o
         5133	    672	      8	   5813	   16b5	/media/i2c/soc_camera/mt9m001.o
      
         5658	   1112	      8	   6778	   1a7a	/media/i2c/soc_camera/mt9t031.o
         6042	    728	      8	   6778	   1a7a	/media/i2c/soc_camera/mt9t031.o
      
         6726	    784	      0	   7510	   1d56	/media/i2c/soc_camera/mt9t112.o
         7110	    408	      0	   7518	   1d5e	/media/i2c/soc_camera/mt9t112.o
      
         6700	    960	     16	   7676	   1dfc	/media/i2c/soc_camera/mt9v022.o
         7084	    584	     16	   7684	   1e04	/media/i2c/soc_camera/mt9v022.o
      
         5569	   1576	      8	   7153	   1bf1	/media/i2c/soc_camera/ov2640.o
         5953	   1200	      8	   7161	   1bf9	/media/i2c/soc_camera/ov2640.o
      
         3018	   2736	      0	   5754	   167a	/media/i2c/soc_camera/ov5642.o
         3394	   2352	      0	   5746	   1672	/media/i2c/soc_camera/ov5642.o
      
         8348	   2104	      8	  10460	   28dc	/media/i2c/soc_camera/ov6650.o
         8716	   1728	      8	  10452	   28d4	/media/i2c/soc_camera/ov6650.o
      
         4165	    696	      8	   4869	   1305	/media/i2c/soc_camera/ov772x.o
         4549	    320	      8	   4877	   130d	/media/i2c/soc_camera/ov772x.o
      
         4033	    608	      8	   4649	   1229	/media/i2c/soc_camera/ov9640.o
         4417	    232	      8	   4657	   1231	/media/i2c/soc_camera/ov9640.o
      
         4983	    784	      8	   5775	   168f	/media/i2c/soc_camera/ov9740.o
         5367	    408	      8	   5783	   1697	/media/i2c/soc_camera/ov9740.o
      
         8578	   1312	      8	   9898	   26aa i2c/soc_camera/rj54n1cb0c.o
         8962	    936	      8	   9906	   26b2 i2c/soc_camera/rj54n1cb0c.o
      
         3886	    696	      0	   4582	   11e6	/media/i2c/soc_camera/tw9910.o
         4270	    320	      0	   4590	   11ee	/media/i2c/soc_camera/tw9910.o
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      6713c88f
  9. 21 10月, 2016 1 次提交
    • M
      [media] soc_camera: don't break long lines · 8f44c392
      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>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      8f44c392
  10. 24 8月, 2016 1 次提交
  11. 17 11月, 2015 1 次提交
    • M
      [media] include/media: split I2C headers from V4L2 core · b5dcee22
      Mauro Carvalho Chehab 提交于
      Currently, include/media is messy, as it contains both the V4L2 core
      headers and some driver-specific headers on the same place. That makes
      harder to identify what core headers should be documented and what
      headers belong to I2C drivers that are included only by bridge/main
      drivers that would require the functions provided by them.
      
      Let's move those i2c specific files to its own subdirectory.
      
      The files to move were produced via the following script:
      	mkdir include/media/i2c
      	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
      	(cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
      	for i in include/media/*.h; do n=`basename $i`;  (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done
      
      And the references corrected via this script:
          MAIN_DIR="media/"
          PREV_DIR="media/"
          DIRS="i2c/"
      
          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
      
      Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      b5dcee22
  12. 01 5月, 2015 3 次提交
  13. 15 11月, 2014 1 次提交
  14. 22 8月, 2014 1 次提交
  15. 22 6月, 2013 1 次提交
  16. 17 6月, 2013 1 次提交
  17. 24 3月, 2013 1 次提交
  18. 05 1月, 2013 2 次提交
  19. 16 8月, 2012 9 次提交