Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235703
b: refs/heads/master
c: 02149cf
h: refs/heads/master
i:
  235701: d112755
  235699: 7d6349a
  235695: a4cc5d2
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jan 24, 2011
1 parent 0b5a156 commit 8d218a2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3dbab7331209d5d85c448675053d3e9e7a4bcd41
refs/heads/master: 02149cf7c7fd1ece5ada28f5a95914f4348df44f
12 changes: 12 additions & 0 deletions trunk/drivers/staging/easycap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@ config EASYCAP
To compile this driver as a module, choose M here: the
module will be called easycap

config EASYCAP_DEBUG
bool "Enable EasyCAP driver debugging"
depends on EASYCAP

---help---
This option enables debug printouts

To enable debug, pass the debug level to the debug module
parameter:

modprobe easycap debug=[0..9]

6 changes: 3 additions & 3 deletions trunk/drivers/staging/easycap/easycap.h
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ unsigned long long int remainder;
* IMMEDIATELY OBVIOUS FROM A CASUAL READING OF THE SOURCE CODE. BEWARE.
*/
/*---------------------------------------------------------------------------*/
extern int easycap_debug;
#define SAY(format, args...) do { \
printk(KERN_DEBUG "easycap:: %s: " \
format, __func__, ##args); \
Expand All @@ -678,7 +677,8 @@ extern int easycap_debug;
format, peasycap->isdongle, __func__, ##args);\
} while (0)

#if defined(EASYCAP_DEBUG)
#ifdef CONFIG_EASYCAP_DEBUG
extern int easycap_debug;
#define JOT(n, format, args...) do { \
if (n <= easycap_debug) { \
printk(KERN_DEBUG "easycap:: %s: " \
Expand All @@ -695,7 +695,7 @@ extern int easycap_debug;
#else
#define JOT(n, format, args...) do {} while (0)
#define JOM(n, format, args...) do {} while (0)
#endif /*EASYCAP_DEBUG*/
#endif /* CONFIG_EASYCAP_DEBUG */

#define MICROSECONDS(X, Y) \
((1000000*((long long int)(X.tv_sec - Y.tv_sec))) + \
Expand Down
29 changes: 16 additions & 13 deletions trunk/drivers/staging/easycap/easycap_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,26 @@

#include "easycap.h"


MODULE_LICENSE("GPL");
MODULE_AUTHOR("R.M. Thomas <rmthomas@sciolus.org>");
MODULE_DESCRIPTION(EASYCAP_DRIVER_DESCRIPTION);
MODULE_VERSION(EASYCAP_DRIVER_VERSION);

#ifdef CONFIG_EASYCAP_DEBUG
int easycap_debug;
static int easycap_bars = 1;
static int easycap_gain = 16;
module_param_named(debug, easycap_debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug level: 0(default),1,2,...,9");
#endif /* CONFIG_EASYCAP_DEBUG */

static int easycap_bars = 1;
module_param_named(bars, easycap_bars, int, S_IRUGO | S_IWUSR);
module_param_named(gain, easycap_gain, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(bars,
"Testcard bars on input signal failure: 0=>no, 1=>yes(default)");

static int easycap_gain = 16;
module_param_named(gain, easycap_gain, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(gain, "Audio gain: 0,...,16(default),...31");
struct easycap_dongle easycapdc60_dongle[DONGLE_MANY];
static struct mutex mutex_dongle;

Expand Down Expand Up @@ -5113,14 +5126,4 @@ JOT(4, "ends\n");
module_init(easycap_module_init);
module_exit(easycap_module_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("R.M. Thomas <rmthomas@sciolus.org>");
MODULE_DESCRIPTION(EASYCAP_DRIVER_DESCRIPTION);
MODULE_VERSION(EASYCAP_DRIVER_VERSION);
#if defined(EASYCAP_DEBUG)
MODULE_PARM_DESC(debug, "Debug level: 0(default),1,2,...,9");
#endif /*EASYCAP_DEBUG*/
MODULE_PARM_DESC(bars,
"Testcard bars on input signal failure: 0=>no, 1=>yes(default)");
MODULE_PARM_DESC(gain, "Audio gain: 0,...,16(default),...31");
/*****************************************************************************/

0 comments on commit 8d218a2

Please sign in to comment.