1. 16 8月, 2012 1 次提交
  2. 14 8月, 2012 1 次提交
    • E
      [media] cx88: Remove duplicate const · d9bc8510
      Emil Goode 提交于
      This patch fixes the following sparse warnings
      by removing use of duplicate const.
      
      drivers/media/video/cx88/cx88.h:152:40:
      	warning: duplicate const
      drivers/media/video/cx88/cx88-core.c:256:33:
      	warning: duplicate const
      drivers/media/video/cx88/cx88-alsa.c:769:41:
      	warning: duplicate const
      
      As commented by Jonathan Nieder:
      
      	These double "const" were introduced in v2.6.37-rc1~64^2~464 (V4L/DVB:
      	drivers/media: Make static data tables and strings const, 2010-08-25).
      
      	The address of an array is already immutable by definition, so for
      	what it's worth, with or without a clarified commit message,
      
      [mchehab@redhat.com: Tested with "gcc -s" (version 4.7.0):
       the produced asm is indeed equal before and after this patch]
      Signed-off-by: NEmil Goode <emilgoode@gmail.com>
      Acked-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d9bc8510
  3. 07 7月, 2012 1 次提交
  4. 13 1月, 2012 1 次提交
  5. 28 7月, 2011 1 次提交
    • M
      [media] Stop using linux/version.h on most video drivers · 1990d50b
      Mauro Carvalho Chehab 提交于
      All the modified drivers didn't have any version increment since
      Jan, 1 2011. Several of them didn't have any version increment
      for a long time, even having new features and important bug fixes
      happening.
      
      As we're now filling the QUERYCAP version with the current Kernel
      Release, we don't need to maintain a per-driver version control
      anymore. So, let's just use the default.
      
      In order to preserve the Kernel module version history, a
      KERNEL_VERSION() macro were added to all modified drivers, and
      the extraver number were incremented.
      
      I opted to preserve the per-driver version control to a few
      pwc, pvrusb2, s2255, s5p-fimc and sh_vou.
      
      A few drivers are still using the legacy way to handle ioctl's.
      So, we can't do such change on them, otherwise, they'll break.
      Those are: uvc, et61x251 and sn9c102.
      
      The rationale is that the per-driver version control seems to be
      actively maintained on those.
      
      Yet, I think that the better for them would be to just use the
      default version numbering, instead of doing that by themselves.
      
      While here, removed a few uneeded include linux/version.h
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      1990d50b
  6. 22 3月, 2011 2 次提交
    • H
      [media] cx88-alsa: fix compiler warning · d6972cc8
      Hans Verkuil 提交于
      drivers/media/video/cx88/cx88-alsa.c: In function 'cx88_audio_initdev':
      drivers/media/video/cx88/cx88-alsa.c:881:20: warning: 'core' may be used uninitialized in this function
      
      The compiler doesn't understand that snd_cx88_create fills in the core
      pointer. So just initialize it to NULL.
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d6972cc8
    • L
      [media] Add proper audio support for Nova-S Plus with wm8775 ADC · 6951803c
      Lawrence Rust 提交于
      This patch adds audio DMA capture and ALSA mixer elements for the line
      input jack of the Hauppauge Nova-S-plus DVB-S PCI card.  The Nova-S-plus
      has a WM8775 ADC that is currently not detected.  This patch enables
      this chip and exports volume, balance mute and ALC elements for ALSA
      mixer controls.
      
      [mchehab@redhat.com: Changed the patch to only talk with wm8775 if board
      info says so. Also, added platform_data support, to avoid changing the
      behaviour for other boards, and fixed CodingStyle]
      
      [awalls@md.metrocast.net: Changed patch to make the WM8775_GID defintion
      bridge driver private and let the bridge driver set the value of
      v4l2_subdev.grp_id.]
      
      --
      To unsubscribe from this list: send the line "unsubscribe linux-media" in
      the body of a message to majordomo@vger.kernel.org
      More majordomo info at  http://vger.kernel.org/majordomo-info.htmlSigned-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NAndy Walls <awalls@md.metrocast.net>
      6951803c
  7. 03 1月, 2011 1 次提交
  8. 23 10月, 2010 1 次提交
  9. 21 10月, 2010 1 次提交
  10. 03 8月, 2010 4 次提交
  11. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  12. 27 2月, 2010 1 次提交
  13. 17 6月, 2009 1 次提交
  14. 07 4月, 2009 1 次提交
  15. 12 1月, 2009 1 次提交
  16. 30 12月, 2008 1 次提交
    • J
      V4L/DVB (9796): drivers/media/video/cx88/cx88-alsa.c: Adjust error-handling code · a8782f66
      Julia Lawall 提交于
      In the function cx88_audio_initdev, the value card has been created using
      snd_card_new.  The other error handling code in this function frees the
      value using snd_card_free.  I have thus changed the first error case to do
      the same.  On the other hand, it may be that card is not sufficiently
      initialized at this point to use snd_card_free, in which case something
      else should be done to free the memory in the error case.
      
      In the function snd_cx88_create the call kfree(chip) in one error case
      looks suspicious, both because it is not done in the other error code, and
      because chip points into the middle of the memory allocated by
      snd_card_new, ie it is not itself associated with a separate kmalloc.
      Therefore I have removed it.
      
      The semantic match that finds the first problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S,S1;
      position p1,p2,p3;
      expression E,E1;
      type T,T1;
      expression *ptr != NULL;
      @@
      
      (
       if ((x@p1 = snd_card_new(...)) == NULL) S
      |
       x@p1 = snd_card_new(...);
      )
       ... when != snd_card_free(...,(T)x,...)
           when != if (...) { <+... snd_card_free(...,(T)x,...) ...+> }
           when != true x == NULL || ...
           when != x = E
           when != E = (T)x
           when any
      (
       if (x == NULL || ...) S1
      |
       if@p2 (...) {
        ... when != snd_card_free(...,(T1)x,...)
            when != if (...) { <+... snd_card_free(...,(T1)x,...) ...+> }
            when != x = E1
            when != E1 = (T1)x
      (
        return \(0\|<+...x...+>\|ptr\);
      |
        return@p3 ...;
      )
      }
      )
      
      @ script:python @
      p1 << r.p1;
      p3 << r.p3;
      @@
      
      print "* file: %s snd_card_new: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line)
      
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      a8782f66
  17. 20 7月, 2008 1 次提交
  18. 27 6月, 2008 1 次提交
  19. 25 4月, 2008 2 次提交
  20. 24 4月, 2008 1 次提交
    • J
      [ALSA] Fix synchronize_irq() bugs, redundancies · f000fd80
      Jeff Garzik 提交于
      free_irq() calls synchronize_irq() for you, so there is no need for
      drivers to manually do the same thing (again).  Thus, calls where
      sync-irq immediately precedes free-irq can be simplified.
      
      However, during this audit several bugs were noticed, where free-irq is
      preceded by a "irq >= 0" check... but the sync-irq call is not covered
      by the same check.
      
      So, where sync-irq could not be eliminated completely, the missing check
      was added.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f000fd80
  21. 01 2月, 2008 1 次提交
    • T
      [ALSA] Remove sound/driver.h · 9004acc7
      Takashi Iwai 提交于
      This header file exists only for some hacks to adapt alsa-driver
      tree.  It's useless for building in the kernel.  Let's move a few
      lines in it to sound/core.h and remove it.
      With this patch, sound/driver.h isn't removed but has just a single
      compile warning to include it.  This should be really killed in
      future.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      9004acc7
  22. 26 1月, 2008 1 次提交
  23. 22 10月, 2007 2 次提交
  24. 16 10月, 2007 1 次提交
  25. 10 10月, 2007 10 次提交