aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/cx25821
Commit message (Collapse)AuthorAgeFilesLines
* staging: Remove unnecessary semicolons when switch (foo) {...};Joe Perches2011-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* drivers/staging/cx25821/cx25821-video.c: introduce missing kfreeJulia Lawall2011-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-03-245-16/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (442 commits) [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE [media] v4l: soc-camera: Store negotiated buffer settings [media] rc: interim support for 32-bit NEC-ish scancodes [media] mceusb: topseed 0x0011 needs gen3 init for tx to work [media] lirc_zilog: error out if buffer read bytes != chunk size [media] lirc: silence some compile warnings [media] hdpvr: use same polling interval as other OS [media] ir-kbd-i2c: pass device code w/key in hauppauge case [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping [media] rc-rc5-hauppauge-new: Add support for the old Black RC [media] rc-rc5-hauppauge-new: Add the old control to the table [media] rc-winfast: Fix the keycode tables [media] a800: Fix a few wrong IR key assignments [media] opera1: Use multimedia keys instead of an app-specific mapping [media] dw2102: Use multimedia keys instead of an app-specific mapping ... Fix up trivial conflicts (remove/modify and some real conflicts) in: arch/arm/mach-omap2/devices.c drivers/staging/Kconfig drivers/staging/Makefile drivers/staging/dabusb/dabusb.c drivers/staging/dabusb/dabusb.h drivers/staging/easycap/easycap_ioctl.c drivers/staging/usbvideo/usbvideo.c drivers/staging/usbvideo/vicam.c
| * [media] staging/cx25721: serialize access to devlistArnd Bergmann2011-03-215-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: cx25821: Remove NULL check before kfreeIlia Mirkin2011-03-143-18/+9
|/ | | | | | | | | | | | | | | | | This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'staging-next' of ↵Linus Torvalds2011-01-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (510 commits) staging: speakup: fix failure handling staging: usbip: remove double giveback of URB Staging: batman-adv: Remove batman-adv from staging Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize staging: hv: remove unneeded osd_schedule_callback staging: hv: convert channel_mgmt.c to not call osd_schedule_callback staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback staging: brcm80211: Fix WL_<type> logging macros Staging: IIO: DDS: AD9833 / AD9834 driver Staging: IIO: dds.h convenience macros Staging: IIO: Direct digital synthesis abi documentation staging: brcm80211: Convert ETHER_TYPE_802_1X to ETH_P_PAE staging: brcm80211: Remove unused ETHER_TYPE_<foo> #defines staging: brcm80211: Remove ETHER_HDR_LEN, use ETH_HLEN staging: brcm80211: Convert ETHER_ADDR_LEN to ETH_ALEN staging: brcm80211: Convert ETHER_IS<FOO> to is_<foo>_ether_addr staging: brcm80211: Remove unused ether_<foo> #defines and struct staging: brcm80211: Convert ETHER_IS_MULTI to is_multicast_ether_addr staging: brcm80211: Remove unused #defines ETHER_<foo>_LOCALADDR Staging: comedi: Fix checkpatch.pl issues in file s526.c ... Fix up trivial conflict in drivers/video/udlfb.c
| * Staging: cx25821: use DEFINE_PCI_DEVICE_TABLENamhyung Kim2010-12-091-1/+1
| | | | | | | | | | | | | | Convert 'const struct pci_device_id xxx[]' to 'DEFINE_PCI_DEVICE_TABLE(xxx)'. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | [media] cx25821: Fix compilation breakage due to BKL dependencyMauro Carvalho Chehab2011-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [media] v4l: fix handling of v4l2_input.capabilitiesHans Verkuil2010-12-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [media] V4L: remove V4L1 compatibility modeHans Verkuil2010-12-292-37/+0
| | | | | | | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] rc: rename the remaining things to rc_coreMauro Carvalho Chehab2010-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Remote Controller subsystem is meant to be used not only by Infra Red but also for similar types of Remote Controllers. The core is not specific to Infra Red. As such, rename: - ir-core.h to rc-core.h - IR_CORE to RC_CORE - namespace inside rc-core.c/rc-core.h To be consistent with the other changes. No functional change on this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] drivers/staging/cx25821: Use pr_fmt and pr_<level>Joe Perches2010-12-2911-322/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [media] ir-core: more cleanups of ir-functions.cDavid Härdeman2010-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cx88 only depends on VIDEO_IR because it needs ir_extract_bits(). Move that function to ir-core.h and make it inline. Lots of drivers had dependencies on VIDEO_IR when they really wanted IR_CORE. The only remaining drivers to depend on VIDEO_IR are bt8xx and saa7134 (ir_rc5_timer_end is the only function exported by ir-functions). Rename VIDEO_IR -> IR_LEGACY to give a hint to anyone writing or converting drivers to IR_CORE that they do not want a dependency on IR_LEGACY. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | [media] Don't export format_by_forcc on two different driversMauro Carvalho Chehab2010-12-022-5/+5
|/ | | | | | | | | | | | | | | | | 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>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6Linus Torvalds2010-10-284-15/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (841 commits) Staging: brcm80211: fix usage of roundup in structures Staging: bcm: fix up network device reference counting Staging: keucr: fix up US_ macro change staging: brcm80211: brcmfmac: Removed codeversion from firmware filenames. staging: brcm80211: Remove unnecessary header files. staging: brcm80211: Remove unnecessary includes from bcmutils.c staging: brcm80211: Removed unnecessary pktsetprio() function. Staging: brcm80211: remove typedefs.h Staging: brcm80211: remove uintptr typedef usage Staging: hv: remove struct vmbus_channel_interface Staging: hv: remove Open from struct vmbus_channel_interface Staging: hv: storvsc: call vmbus_open directly Staging: hv: netvsc: call vmbus_open directly Staging: hv: channel: export vmbus_open to modules Staging: hv: remove Close from struct vmbus_channel_interface Staging: hv: netvsc: call vmbus_close directly Staging: hv: storvsc: call vmbus_close directly Staging: hv: channel: export vmbus_close to modules Staging: hv: remove SendPacket from struct vmbus_channel_interface Staging: hv: storvsc: call vmbus_sendpacket directly ... Fix up conflicts in drivers/staging/cx25821/cx25821-audio-upstream.c drivers/staging/cx25821/cx25821-audio.h due to warring whitespace cleanups (neither of which were all that great)
| * Merge 'staging-next' to Linus's treeGreg Kroah-Hartman2010-10-284-23/+31
| |\ | | | | | | | | | | | | | | | | | | | | | This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * Staging: cx25821: Makefile: replace the use of <module>-objs with <module>-yTracey Dent2010-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Changed <module>-objs to <module>-y in Makefile. Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * Staging: cx25821: Makefile: cleaned up Makefile cflag linesTracey Dent2010-10-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Changed to use the proper ccflags-y option Signed-off-by: Tracey Dent <tdent48227@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * Staging: cx25821: clenup warnings found by checkpatch.pl tool in ↵Gorskin Ilya2010-08-312-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cx25821-audio-upstream.c and cx25821-audio.h. This is a patch to the cx25821-audio-upstream.c and cx25821-audio.h that fixes up a warnings found by checkpatch.pl tool. Signed-off-by: Ilya Gorskin <Revent82@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * staging: cx25821: call disable_pci_device() if pci_probe() failedKulikov Vasiliy2010-08-311-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Driver should call disable_pci_device() if it returns from pci_probe() with error. Also it must not be called if pci_request_region() fails as it means that somebody uses device resources and rules the device. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge branch 'v4l_for_linus' of ↵Linus Torvalds2010-10-2816-186/+177
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
| * | [media] Staging: cx25821: fix braces and space coding style issuesRuslan Pisarev2010-10-2112-179/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | Errors found by the checkpatch.pl tool. [mchehab@redhat.com: merged a series of CodingStyle cleanup patches for cx25851. They're all from the same author, and patches the same driver] Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua> Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | [media] Staging: cx25821: remove spaces after parenthesisRuslan Pisarev2010-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix "ERROR: space prohibited after that open parenthesis '('" This is a patch to the cx25821-audio-upstream.h file that fixed up a space errors found by the checkpatch.pl tools. Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | V4L/DVB: videobuf: add queue argument to videobuf_waiton()Hans Verkuil2010-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | videobuf_waiton() must unlock and relock ext_lock if it has to wait. For that to happen it needs the videobuf_queue pointer. Don't attempt to unlock/relock q->ext_lock unless it was locked in the first place. vb->state has to be protected by a spinlock to be safe. This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>. [mchehab@redhat.com: add extra argument to a few missing places] Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | V4L/DVB: videobuf: add ext_lock argument to the queue init functionsHans Verkuil2010-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add an ext_lock argument to the videobuf init functions. This allows drivers to pass the vdev->lock pointer (or any other externally held lock) to videobuf. For now all drivers just pass NULL. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | V4L/DVB: Fix Kconfig dependencies for VIDEO_IRMauro Carvalho Chehab2010-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | warning: (VIDEO_GO7007 && STAGING && !STAGING_EXCLUDE_BUILD && VIDEO_DEV && PCI && I2C && INPUT && BKL && SND || VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE) warning: (VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | V4L/DVB: cx25821: fix gcc warning when compiled with allyesconfigMauro Carvalho Chehab2010-10-211-1/+1
| | | | | | | | | | | | | | | | | | drivers/staging/cx25821/cx25821-alsa.c:632: warning: ‘cx25821_audio_pci_tbl’ defined but not used Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | V4L/DVB: cx25821: convert to the mediabus APIHans Verkuil2010-10-211-1/+3
| |/ | | | | | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | BKL: introduce CONFIG_BKL.Arnd Bergmann2010-10-211-0/+1
|/ | | | | | | | | | | | | | | | | | | With all the patches we have queued in the BKL removal tree, only a few dozen modules are left that actually rely on the BKL, and even there are lots of low-hanging fruit. We need to decide what to do about them, this patch illustrates one of the options: Every user of the BKL is marked as 'depends on BKL' in Kconfig, and the CONFIG_BKL becomes a user-visible option. If it gets disabled, no BKL using module can be built any more and the BKL code itself is compiled out. The one exception is file locking, which is practically always enabled and does a 'select BKL' instead. This effectively forces CONFIG_BKL to be enabled until we have solved the fs/lockd mess and can apply the patch that removes the BKL from fs/locks.c. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* Staging: Merge staging-next into Linus's treeGreg Kroah-Hartman2010-08-051-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/staging/Kconfig drivers/staging/batman-adv/bat_sysfs.c drivers/staging/batman-adv/device.c drivers/staging/batman-adv/hard-interface.c drivers/staging/cx25821/cx25821-audups11.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: Remove unnecessary casts of private_dataJoe Perches2010-07-221-1/+1
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: cx25821: added KERN_ facility levelsScott Kidder2010-06-181-15/+10
| | | | | | | | | | | | | | | | Fixed issues found by checkpatch.pl including adding KERN_ facility levels to printk() calls and C99 comments. Signed-off-by: Scott Kidder <scott.kidder11@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | V4L/DVB: videobuf: Rename vmalloc fields to vaddrLaurent Pinchart2010-08-021-1/+1
| | | | | | | | | | | | | | | | | | The videobuf_dmabuf and videobuf_vmalloc_memory fields have a vmalloc field to store the kernel virtual address of vmalloc'ed buffers. Rename the field to vaddr. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: Remove videobuf_sg_alloc abuseLaurent Pinchart2010-08-021-15/+14
| | | | | | | | | | | | | | | | | | The cx88 and cx25821 drivers abuse videobuf_buffer to handle audio data. Remove the abuse by creating private audio buffer structures with a videobuf_dmabuf field. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functionsLaurent Pinchart2010-08-022-3/+3
| | | | | | | | | | | | | | | | | | | | Instead of creating dirty wrappers around videobuf_dma_map/unmap that create a dummy videobuf_queue structure, modify videobuf_dma_map/unmap to take a device pointer argument and use it directly. The videobuf_sg_dma_map/unmap then become unused and can be removed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: cx25821: Fix bad whitespacingMauro Carvalho Chehab2010-08-027-424/+424
| | | | | | | | | | | | Should use tabs for identation, and not whitespace Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: cx25821: Add a kernel level at printk'sMauro Carvalho Chehab2010-08-021-11/+11
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: cx25821: Make comments C99 compliantMauro Carvalho Chehab2010-08-025-933/+933
| | | | | | | | | | | | | | | | | | | | Replace all // comments by /* */ Patch generated with this small script: for i in drivers/staging/cx25821/*.[ch]; do cat $i|perl -ne 's,//\s*(.*)\s*\n,/* $1 */\n,g; print $_;' >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: cx25821: Removed duplicate code and cleaned upPalash Bandyopadhyay2010-08-0227-5504/+1047
|/ | | | | Signed-off-by: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge staging-next tree into Linus's latest versionGreg Kroah-Hartman2010-05-213-10/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/staging/arlan/arlan-main.c drivers/staging/comedi/drivers/cb_das16_cs.c drivers/staging/cx25821/cx25821-alsa.c drivers/staging/dt3155/dt3155_drv.c drivers/staging/hv/hv.c drivers/staging/netwave/netwave_cs.c drivers/staging/wavelan/wavelan.c drivers/staging/wavelan/wavelan_cs.c drivers/staging/wlags49_h2/wl_cs.c This required a bit of hand merging due to the conflicts that happened in the later .34-rc releases, as well as some staging driver changing coming in through other trees (v4l and pcmcia). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: Drop memory allocation castJulia Lawall2010-05-113-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: cx25821: Hoist assign from ifJoe Perches2010-05-111-1/+2
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: cx25821 fixed C99 comments, white spaces and unnecessary bracesWouter Van Rooy2010-05-111-33/+39
| | | | | | | | | | | | | | | | This patch fixes some C99 style comments, trailing white spaces and some unnecessary 'if' braces found by checkpatch.pl Signed-off-by: Wouter Van Rooy <wouter.vanrooy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | V4L/DVB: Fix unlock logic at medusa_video_initMauro Carvalho Chehab2010-05-191-32/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Dan Carpenter: > This was my patch: "cx25821: fix double unlock in medusa_video_init()" > > It accidentally got merged two times. The version from the staging tree > is not correct. Please can you revert it: > 7a02f549fcc30fe6be0c0024beae9a3db22e1af6 "Staging: cx25821: fix double > unlock in medusa_video_init()" After reviewing the logic at the function, instead of just adding a patch to revert the wrong one, the better is to apply a different logic: add a goto that will always unlock and return the error. This simplifies the code a little bit, and, instead of just return -EINVAL, it will return the error condition reported by the called functions. This patch is folded with another patch from Dan that added one missing goto. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: v4l2-common: simplify prio utility functionsHans Verkuil2010-05-1913-42/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v4l2_prio_init/open/close returned an int when in fact they would always return 0. Make these void functions. v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a pointer for no good reason. Replace with a normal enum v4l2_priority argument. These changes will simplify the work of moving priority handling into the v4l core. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: cx25821-video-upstream.c: Added severity to printk callsRicardo Maraschini2010-05-191-16/+16
| | | | | | | | | | Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: staging:cx25821:fixes coding styles in cx25821-i2c.csai2010-05-191-1/+1
| | | | | | | | | | | | | | | | This is a patch to the cx25821-i2c.c file that fixes warning and errors found by checkpatch.pl tool [mchehab@redhat.com: fix conflicts with changeset 2587a7ef7b8bc3c7db7c43659297b45b168922ab] Signed-off-by: sai<tsg321@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: staging:cx2581: fixes coding style issues in cx25821-cards.csai2010-05-191-2/+2
| | | | | | | | | | | | | | This patch fixes all the coding style issues reported by checkpatch.pl tool Signed-off-by: sai <tsg321@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: cx25821: fix coding style issues in cx25821-alsa.csai gopal2010-05-191-1/+2
| | | | | | | | | | | | | | | | | | This is a patch to cx25821-alsa.c file that fixes of most of the warning & errors found by checkpatch.pl tool [mchehab@redhat.com: Fix conflicts with changeset 4e0c923a0d23f86c7331b32bc2aeb280e10e029e] Signed-off-by: sai gopal <tsg321@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacksAndreas Bombe2010-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Due to obvious copy and paste coding a number of video capture drivers which implement a limit on the buffer memory decremented the user supplied buffer count in a while loop until it reaches an acceptable value. This is a silly thing to do when the maximum value can be directly computed. Signed-off-by: Andreas Bombe <aeb@debian.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>