summaryrefslogtreecommitdiffstats
path: root/drivers/staging/easycap
AgeCommit message (Collapse)Author
2011-02-18staging/easycap: add first level indetnation for easycap_low.cTomas Winkler
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: replace NOREADBACK with moduel parameterTomas Winkler
NOREADBACK doesn't justify Kconfig option so we use module paramter for it. Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: use regget for register back readingTomas Winkler
Use regget to reading back what was written to a register. This required changning size argument to regget signature On the way remove usless variable casting Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09stagine/easycap: make functions regset and regget staticTomas Winkler
regget and regset functions are used only from within easycap_low.c so they can be static Move the functions to avoid forward declarations Move GET and SET macro definitions into the c-file Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: add first level indentation to regget/set functionsTomas Winkler
Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: remove TESTONE and EASYCAP_TESTTONETomas Winkler
No longer needed feature for testing driver's handling of the audio stream independently of the urb completion routine Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: remove EASYCAP_SILENT optionTomas Winkler
This has simulated a fault condition of probing for audio capability Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: remove AUDIOTIME featureTomas Winkler
remove code guarded by AUDIOTIME define This was experimental code in which I tried improve audio-video synchronization but it didn't work well Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: remove obsolete VIDIOC_S_CTRL_OLD ioctlTomas Winkler
Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: replace one more EASYCAP_NEEDS_ALSA with CONFIG_EASYCAP_OSSTomas Winkler
Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09stagine/easycap: use module paramter for default encoding instead of ifdefTomas Winkler
remove PREFER_NTSC ifdef as it cannot be possible put into Kconfig Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: prefer printk over SAY in module entry functionsTomas Winkler
Use INFO level when registering driver and ERR for error. Drop messages from oneliner exit function Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: remove paranoid argument checks in usb probe/disconnectTomas Winkler
remove checks for NULL for usb_interface. USB bus won't call these functions with NULL Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging/easycap: fix build when SND is not enabledTomas Winkler
Fix easycap build when CONFIG_SOUND is enabled but CONFIG_SND is not enabled. use choice construct to select between ALSA and OSS API binding drivers/built-in.o: In function `easycap_usb_disconnect': easycap_main.c:(.text+0x2aba20): undefined reference to `snd_card_free' drivers/built-in.o: In function `easycap_alsa_probe': (.text+0x2b784b): undefined reference to `snd_card_create' drivers/built-in.o: In function `easycap_alsa_probe': (.text+0x2b78fb): undefined reference to `snd_pcm_new' drivers/built-in.o: In function `easycap_alsa_probe': (.text+0x2b7916): undefined reference to `snd_pcm_set_ops' drivers/built-in.o: In function `easycap_alsa_probe': (.text+0x2b795b): undefined reference to `snd_card_register' drivers/built-in.o: In function `easycap_alsa_probe': (.text+0x2b79d8): undefined reference to `snd_card_free' drivers/built-in.o: In function `easycap_alsa_probe': (.text+0x2b7a78): undefined reference to `snd_card_free' drivers/built-in.o: In function `easycap_alsa_complete': (.text+0x2b7e68): undefined reference to `snd_pcm_period_elapsed' drivers/built-in.o:(.data+0x2cae8): undefined reference to `snd_pcm_lib_ioctl' Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: R.M. Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: add level 1 tabs in usb_probe/disconnect functionTomas Winkler
Add first level indentation before revamping the functions This of course breaks 80 characters limit but it will be fixed through the revamp Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04stagine/easycap: make easyoss_fops staticTomas Winkler
easyoss_fops are only accessed from within easycap_sound_oss file Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: kill declaration of not existing variablesTomas Winkler
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: don't shadow rc variable from macrosTomas Winkler
rc is used extensively in code as return code variable so it is better not shadowing it in macros Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: replace underscored types with regular onceTomas Winkler
the underscored types should be used in user space headers only Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: rename variable s16 to tmpTomas Winkler
naming variable s16 is confusing since it is also a type name. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: rename variable u8 to tmpTomas Winkler
naming variable u8 is confusing since it is also a type name. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: rename variable s32 to tmpTomas Winkler
1. naming variable s32 is confusing since it is also a type name. 2. use s32 instead of __s32, the later is for user space Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: remove explicit NULL initializationTomas Winkler
remove intializations to NULL where not needed and let the compiler find flows with unitilized variables. Fix one such flow in easycap_vma_fault function Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: improve coding style when checking return valueTomas Winkler
use idiom 'if (rc)' for checking return value instead of if (0 != rc) Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: fix artificial line breaksTomas Winkler
fix style issue: if (NULL != pdata_urb->purb) { created by the patch: 'staging/easycap: don't cast NULL pointer' After dropping the casting there is no longer 80 columns limitation Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: repace #if defined with simpler #ifdefTomas Winkler
for sake of readability replace #if defined with #ifdef and #if (!defined with #ifndef Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: kill EASYCAP_NEEDS_UNLOCKED_IOCTLTomas Winkler
we can kill this option for in-kernel driver Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: remove comment: EASYCAP_NEEDS_ALSATomas Winkler
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04staging/easycap: don't cast NULL pointerTomas Winkler
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/easycap: make ALSA ops function static in sound.cTomas Winkler
1. make also ops function static 2. move around code so to avid forward declarations Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/easycap: make oss ops function static in sound_oss.cTomas Winkler
1. make oss ops function static 2. move around code so to avid forward declarations 3. move OSS ioclts from ioctl.c to sound_oss.c Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/easycap: make OSS compilation optional instead of ALSATomas Winkler
OSS is deprecated yet currently it is reported to be more stable therefore we keep it but make it optional Revert the conditional compilation: add CONFIG_EASYCAP_OSS and kill EASYCAP_NEEDS_ALSA move oss-only code from easycap_sound.c to easycap_sound_oss.c Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/easycap: implement strerror functionTomas Winkler
Replace long switch statements that just print out errno with strerror function. It reduces around 700 lines from the code. The function should be probably dropped at all but leave for now to not break currently expected debug output. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/easycap: easycap.h ident correctly signed_div_resultTomas Winkler
indent level 1 by tabs Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging/easycap: fix missing backslash in ifdef statementTomas Winkler
the backslash was removed by mistake in the patch 'staging:easycap: drop redundant backslashes from the code' this breaks compilation only when EASYCAP_NEEDS_ALSA is not set Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: easycap.h use indentation for first levelTomas Winkler
replace struct { int a; } with more readable struct { int a; } Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: make functions local to easycap_main.c staticTomas Winkler
1. remove declarations from the header file 2. rearange code in main.c to reduce number of forward declarations Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: group module parameters handlingTomas Winkler
1. For readability group module parameters handling on one place 2. Introduce kernel config option EASY_DEBUG Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: use #ifndef __EASYCAP_H_ for header inclusion protectionTomas Winkler
use common #ifndef __EASYCAP_H_ instead of if (!defined(EASYCAP_H)) for protecting header from double inclusion Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: remove redunant headersTomas Winkler
place all globals to easycap.h, which is included by all c-files easycap_standard: fix declaration vs. definiton conflict Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: fix sparse warnings :conversion of int to enumTomas Winkler
easycap_settings.c:587:58: warning: conversion of easycap_settings.c:587:58: unsigned int to easycap_settings.c:587:58: int enum v4l2_field easycap_settings.c:593:63: warning: conversion of easycap_settings.c:593:63: unsigned int to easycap_settings.c:593:63: int enum v4l2_colorspace Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-25staging: easycap: fix sparse warnings 'Should it be static'Tomas Winkler
easycap_main.c:41:23: warning: symbol 'easycapdc60_dongle' was not declared. Should it be static? easycap_main.c:49:22: warning: symbol 'easycap_usb_device_id_table' was not declared. Should it be static? easycap_main.c:69:30: warning: symbol 'easycap_fops' was not declared. Should it be static? easycap_main.c:82:29: warning: symbol 'easycap_vm_ops' was not declared. Should it be static? easycap_main.c:87:25: warning: symbol 'easycap_class' was not declared. Should it be static? easycap_main.c:95:35: warning: symbol 'v4l2_fops' was not declared. Should it be static? easycap_main.c:5071:1: warning: symbol 'easycap_module_init' was not declared. Should it be static? easycap_main.c:5101:1: warning: symbol 'easycap_module_exit' was not declared. Should it be static? easycap_low.c:45:50: warning: symbol 'stk1160configPAL' was not declared. Should it be static? easycap_low.c:87:28: warning: symbol 'stk1160configNTSC' was not declared. Should it be static? easycap_low.c:129:50: warning: symbol 'saa7113configPAL' was not declared. Should it be static? easycap_low.c:187:28: warning: symbol 'saa7113configNTSC' was not declared. Should it be static? easycap_ioctl.c:915:5: warning: symbol 'adjust_mute' was not declared. Should it be static? easycap_settings.c:42:31: warning: symbol 'easycap_standard' was not declared. Should it be static? easycap_settings.c:312:23: warning: symbol 'easycap_format' was not declared. Should it be static? easycap_settings.c:607:23: warning: symbol 'easycap_control' was not declared. Should it be static? Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21staging: easycap: replace STRINGIZE with __stringify()Tomas Winkler
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21staging: easycap: kill EASYCAP_NEEDS_CARD_CREATETomas Winkler
for in-tree driver we can use snd_card_create for backports to older kernels this can be easily wrapped Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21staging: easycap: drop redunant backslashes from the codeTomas Winkler
remove \ from the code where C syntex doesnt require it Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21Staging: easycap: fix sparse warnings for module parametersTomas Winkler
easycap_main.c:34:5: warning: symbol 'easycap_debug' was not declared. Should it be static? easycap_main.c:36:5: warning: symbol 'easycap_gain' was not declared. Should it be static? These two variables actually were declared in several places. The variables are used in several files. I've fixed "easycap_debug" so it gets declared in one place only and included properly. For "easycap_gain" made it static and I created added a ->gain member to the easycap struct. This seems cleaner than using a global variable and later on we may make this controlable via sysfs. Cc:Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21staging: easycap: add ALSA supportMike Thomas
This is necessary because some distributions are disabling OSS entirely. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21Staging: easycap: Make easycap_debug non-staticMike Thomas
The parameter easycap_debug appears in macros JOT and JOM and therefore needs to be visible from all source files. The easycap_ prefix should be sufficient to avoid namespace clashes outside the module. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Merge 2.6.37-rc5 into staging-nextGreg Kroah-Hartman
This was done to handle a number of conflicts in the batman-adv and winbond drivers properly. It also now allows us to fix up the sysfs attributes properly that were not in the .37 release due to them being only in this tree at the time. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29staging: easycap needs smp_lock.h, fixes build errorRandy Dunlap
Add header file to fix build error: drivers/staging/easycap/easycap_main.c:4251: error: implicit declaration of function 'lock_kernel' drivers/staging/easycap/easycap_main.c:4254: error: implicit declaration of function 'unlock_kernel' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>