summaryrefslogtreecommitdiff
path: root/drivers/staging/cx25821/cx25821-video.c
AgeCommit message (Collapse)Author
2011-11-03[media] move cx25821 out of stagingMauro Carvalho Chehab
This driver had the major issues already fixed. Move it out of staging. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-16Staging: cx25821: Replace :? by if-else in cx25821-video.cLeonid V. Fedorenchik
Replace :? operator by equivalent if-else statement where in improves readability. Don't add else branch if it is not needed. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Fix braces around statements in cx25821-video.cLeonid V. Fedorenchik
Delete braces around single statements. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 35Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 34Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 33Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 32Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 31Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 30Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 29Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 28Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 27Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 26Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 25Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 24Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 23Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 22Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 21Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 20Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 19Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 18Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 17Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 16Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 15Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 14Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 13Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 12Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 11Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 10Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 9Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 8Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 7Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 6Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 5Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 4Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 3Leonid V. Fedorenchik
Change indent with spaces to tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 2Leonid V. Fedorenchik
Change indent with spaces to use tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Change indent with spaces to tabs 1Leonid V. Fedorenchik
Changed indent with spaces to use tabs. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Fix indent in commentLeonid V. Fedorenchik
Change indent in comment to use tabs instead of spaces. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Fix obscure line endingsLeonid V. Fedorenchik
Fix obscure line endings to less obscure ones. Rationale: readability. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Fix function signaturesLeonid V. Fedorenchik
Fix long function signatures (over 80 characters) and indent them properly. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16Staging: cx25821: Fix labels' placement in cx25821-video.cLeonid V. Fedorenchik
Delete whitespace before labels. Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when switch (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_switch.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-20drivers/staging/cx25821/cx25821-video.c: introduce missing kfreeJulia Lawall
Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-21[media] staging/cx25721: serialize access to devlistArnd Bergmann
Out of the three files accessing the device list, one uses a mutex, one uses the BKL and one does not have any locking. That is of course pointless, so let's make all of them use the same mutex, and get rid of one more BKL user. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-05[media] cx25821: Fix compilation breakage due to BKL dependencyMauro Carvalho Chehab
drivers/staging/cx25821/cx25821-video.c: In function ‘video_open’: drivers/staging/cx25821/cx25821-video.c:817:8: error: implicit declaration of function ‘lock_kernel’ drivers/staging/cx25821/cx25821-video.c:834:9: error: implicit declaration of function ‘unlock_kernel’ This patch just adds a header with BKL function. It should be enough to avoid compilation breakage, but, as BKL will be removed, we need to properly fix it on a latter patch. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Reported-by: Anca Emanuel <anca.emanuel@gmail.com> Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30[media] v4l: fix handling of v4l2_input.capabilitiesHans Verkuil
The v4l core sets the v4l2_input.capabilities field based on the supplied v4l2_ioctl_ops. However, several drivers do a memset or memcpy of the v4l2_input struct, thus overwriting that field incorrectly. Either remove the memset (which is already done by the v4l core), or add the proper capabilities field in case of a memcpy. The same is also true for v4l2_output, but that only affected the ivtv driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] V4L: remove V4L1 compatibility modeHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] drivers/staging/cx25821: Use pr_fmt and pr_<level>Joe Perches
Fix several defects with bad line continuation uses that introduce whitespace. Fix several defects with lines missing "\n". Standardize prefixes via pr_fmt. Remove internal cx25821 prefixes. Standardize :%s():" ... __func__ uses. Coalesce long formats. Add KERN_<level> prefixes via pr_<level> to printks. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-02[media] Don't export format_by_forcc on two different driversMauro Carvalho Chehab
Drivers should append their name on exported symbols, to avoid conflicts with allyesconfig: drivers/staging/built-in.o: In function `format_by_fourcc': /home/v4l/work_trees/linus/drivers/staging/cx25821/cx25821-video.c:96: multiple definition of `format_by_fourcc' drivers/media/built-in.o:/home/v4l/work_trees/linus/drivers/media/common/saa7146_video.c:88: first defined here Let's rename both occurences with a small shellscript: for i in drivers/staging/cx25821/*.[ch]; do sed s,format_by_fourcc,cx25821_format_by_fourcc,g <$i >a && mv a $i; done for i in drivers/media/common/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done for i in include/media/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>