1. 02 3月, 2017 1 次提交
  2. 01 2月, 2017 1 次提交
  3. 21 10月, 2016 1 次提交
    • M
      [media] ivtv: don't break long lines · 67ccf860
      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>
      67ccf860
  4. 12 10月, 2016 1 次提交
    • P
      kthread: kthread worker API cleanup · 3989144f
      Petr Mladek 提交于
      A good practice is to prefix the names of functions by the name
      of the subsystem.
      
      The kthread worker API is a mix of classic kthreads and workqueues.  Each
      worker has a dedicated kthread.  It runs a generic function that process
      queued works.  It is implemented as part of the kthread subsystem.
      
      This patch renames the existing kthread worker API to use
      the corresponding name from the workqueues API prefixed by
      kthread_:
      
      __init_kthread_worker()		-> __kthread_init_worker()
      init_kthread_worker()		-> kthread_init_worker()
      init_kthread_work()		-> kthread_init_work()
      insert_kthread_work()		-> kthread_insert_work()
      queue_kthread_work()		-> kthread_queue_work()
      flush_kthread_work()		-> kthread_flush_work()
      flush_kthread_worker()		-> kthread_flush_worker()
      
      Note that the names of DEFINE_KTHREAD_WORK*() macros stay
      as they are. It is common that the "DEFINE_" prefix has
      precedence over the subsystem names.
      
      Note that INIT() macros and init() functions use different
      naming scheme. There is no good solution. There are several
      reasons for this solution:
      
        + "init" in the function names stands for the verb "initialize"
          aka "initialize worker". While "INIT" in the macro names
          stands for the noun "INITIALIZER" aka "worker initializer".
      
        + INIT() macros are used only in DEFINE() macros
      
        + init() functions are used close to the other kthread()
          functions. It looks much better if all the functions
          use the same scheme.
      
        + There will be also kthread_destroy_worker() that will
          be used close to kthread_cancel_work(). It is related
          to the init() function. Again it looks better if all
          functions use the same naming scheme.
      
        + there are several precedents for such init() function
          names, e.g. amd_iommu_init_device(), free_area_init_node(),
          jump_label_init_type(),  regmap_init_mmio_clk(),
      
        + It is not an argument but it was inconsistent even before.
      
      [arnd@arndb.de: fix linux-next merge conflict]
       Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de
      Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.comSuggested-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3989144f
  5. 19 12月, 2015 1 次提交
  6. 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
  7. 16 11月, 2015 2 次提交
  8. 01 5月, 2015 1 次提交
  9. 03 4月, 2015 1 次提交
  10. 17 10月, 2013 1 次提交
  11. 04 7月, 2013 1 次提交
  12. 17 6月, 2013 1 次提交
  13. 24 3月, 2013 1 次提交
  14. 04 1月, 2013 1 次提交
    • G
      Drivers: media: remove __dev* attributes. · 4c62e976
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c62e976
  15. 21 12月, 2012 1 次提交
  16. 02 10月, 2012 1 次提交
  17. 19 9月, 2012 1 次提交
    • A
      [media] ivtv, ivtv-alsa: Add initial ivtv-alsa interface driver for ivtv · 269c11fb
      Andy Walls 提交于
      This is a cut-and-paste port of the cx18-alsa driver to
      create an ivtv-alsa interface module for the ivtv driver.
      It is not actually hooked-up to the PCM stream DMA buffers
      from the ivtv driver yet.  That will be done in a coming change,
      since that portion is so very different from the cx18 driver.
      This code has all or more of the bugs and shortcomings of the
      cx18-alsa interface driver: inconsistent use of itvsc->slock,
      ivtv-alsa-mixer.c is dead code, assumes 48 ksps regardless
      of the actual setting of the audio capture, problems with
      proper struct ivtv and struct ivtv_stream housekeeping,
      struct ivtv_open_id.v4l2_fh abuse, and $DIETY knows what else.
      Signed-off-by: NAndy Walls <awalls@md.metrocast.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      269c11fb
  18. 16 8月, 2012 1 次提交
  19. 12 6月, 2012 1 次提交
  20. 05 5月, 2012 1 次提交
  21. 08 3月, 2012 3 次提交
  22. 14 2月, 2012 2 次提交
  23. 16 1月, 2012 1 次提交
  24. 13 1月, 2012 1 次提交
  25. 03 11月, 2011 1 次提交
  26. 01 6月, 2011 1 次提交
  27. 20 5月, 2011 1 次提交
  28. 29 12月, 2010 1 次提交
  29. 09 8月, 2010 3 次提交
  30. 03 8月, 2010 2 次提交
    • I
      V4L/DVB: ivtv: Automatic firmware reload · 215659d1
      Ian Armstrong 提交于
      If the firmware has failed, this patch will automatically reload &
      restart the card. The previous card state will be restored on a
      successful restart.  Firmware reload will only happen if neither the
      encoder or decoder is active.  If the card is busy then behaviour is as
      before, returning -EIO on device access until the reload can occur. On
      cards that support video output, coloured bars will be displayed during
      the reload.
      
      Andy Walls (ivtv maintainer and patch committer) made minor tweaks to
      comments and the logged messages, but nothing substantial otherwise.
      Signed-off-by: NIan Armstrong <ian@iarmst.demon.co.uk>
      Signed-off-by: NAndy Walls <awalls@md.metrocast.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      215659d1
    • I
      V4L/DVB: ivtv: Add firmare monitoring and debug mode to ignore firmware problems · 914610e8
      Ian Armstrong 提交于
      >From Ian's e-mail:
      When a device is opened the firmware state will be checked. If it isn't
      responding then the open will fail with -EIO.  Due to the nature of the
      hardware, a single failed check will block everything since we don't know
      exactly what has failed. A side effect of this is the blocking of debug
      access, so an additional debug level has been created which allows the block
      to be bypassed.
      
      Andy Walls' modifications:
      I modified Ian's patch to add a separate fw_debug module parameter to change
      the driver's behavior, as opposed to using the normal debug module parameter.
      The fw_debug module parameter is only available when CONFIG_VIDEO_ADV_DEBUG
      is set.
      I also made some minor whitespace adjustments and changed some warning
      messages to be a bit more specific.  s/happy/glad/g
      Signed-off-by: NIan Armstrong <ian@iarmst.demon.co.uk>
      Signed-off-by: NAndy Walls <awalls@md.metrocast.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      914610e8
  31. 29 6月, 2010 1 次提交
    • T
      ivtv: use kthread_worker instead of workqueue · 7bc46560
      Tejun Heo 提交于
      Upcoming workqueue updates will no longer guarantee fixed workqueue to
      worker kthread association, so giving RT priority to the irq worker
      won't work.  Use kthread_worker which guarantees specific kthread
      association instead.  This also makes setting the priority cleaner.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: ivtv-devel@ivtvdriver.org
      Cc: linux-media@vger.kernel.org
      7bc46560
  32. 18 5月, 2010 1 次提交
  33. 27 2月, 2010 1 次提交
    • E
      V4L/DVB: ivtv: Add initial entry for Sony VAIO Giga Pocket (Kikyou) cards · 7c12167b
      Eric Anderson 提交于
      This is a slightly modified version of Eric Anderson's original patch
      for the Sony Giga Pocket board.  It has been updated to apply to the
      latest ivtv driver version by Hans Verkuil <hverkuil@xs4all.nl> and
      Andy Walls <awalls@radix.net>.  Also Andy Walls modified the patch to
      use a new Sony BTF-Pnx01Z tuner entry based on Eric Anderson's experimental
      findings for the bandswitch.
      
      >From Eric Anderson's original email:
      
      1. The tuner on the card doesn't seem to match any standard
      ones. I modified an existing tuner entry. Ideally a new tuner
      entry should be created. (The only difference from the one I
      modified is that the low-to-mid range frequency cut-off is
      slightly different, as are the bit config settings.)
      
      2. It wasn't obvious how to choose a second audio input other
      than using "radio" as an option. Basically there's two GPIO
      audio inputs. Using radio allowed me to avoid major restructuring
      to the code. (perhaps other cards don't have this often...)
      
      3. It's not clear that there's a mute setting that works. Not
      sure why.
      
      4. I haven't had a chance to test the two Svideo inputs. I set
      them to COMPOSITE1 and SVIDEO2, but I'm not sure those are the
      correct settings. The standard composite video inputs seem to work.
      Signed-off-by: NAndy Walls <awalls@radix.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7c12167b