Commit 62af33ec authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

staging/easycap: make module params private/static, fix build

The easycap driver has module parameters (bars, gain, & debug)
with global scope that intrude on the kernel namespace and cause
build problems.  Change the names of them to be driver-specific
and make 2 of them static.

drivers/built-in.o:(.bss+0x97c00): multiple definition of `debug'
ld: Warning: size of symbol `debug' changed from 58 in arch/x86/built-in.o to 4 in drivers/built-in.o
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a65e659d
...@@ -630,13 +630,13 @@ unsigned long long int remainder; ...@@ -630,13 +630,13 @@ unsigned long long int remainder;
#if defined(EASYCAP_DEBUG) #if defined(EASYCAP_DEBUG)
#define JOT(n, format, args...) do { \ #define JOT(n, format, args...) do { \
if (n <= debug) { \ if (n <= easycap_debug) { \
printk(KERN_DEBUG "easycap:: %s: " \ printk(KERN_DEBUG "easycap:: %s: " \
format, __func__, ##args);\ format, __func__, ##args);\
} \ } \
} while (0) } while (0)
#define JOM(n, format, args...) do { \ #define JOM(n, format, args...) do { \
if (n <= debug) { \ if (n <= easycap_debug) { \
printk(KERN_DEBUG "easycap::%i%s: " \ printk(KERN_DEBUG "easycap::%i%s: " \
format, peasycap->isdongle, __func__, ##args);\ format, peasycap->isdongle, __func__, ##args);\
} \ } \
......
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
* *
*/ */
/*****************************************************************************/ /*****************************************************************************/
extern int debug; extern int easycap_debug;
extern int gain; extern int easycap_gain;
extern struct easycap_dongle easycap_dongle[]; extern struct easycap_dongle easycap_dongle[];
...@@ -1082,11 +1082,11 @@ SAM("0x%04X:0x%04X is audio vendor id\n", id1, id2); ...@@ -1082,11 +1082,11 @@ SAM("0x%04X:0x%04X is audio vendor id\n", id1, id2);
* SELECT AUDIO SOURCE "LINE IN" AND SET THE AUDIO GAIN. * SELECT AUDIO SOURCE "LINE IN" AND SET THE AUDIO GAIN.
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
if (31 < gain) if (31 < easycap_gain)
gain = 31; easycap_gain = 31;
if (0 > gain) if (0 > easycap_gain)
gain = 0; easycap_gain = 0;
if (0 != audio_gainset(pusb_device, (__s8)gain)) if (0 != audio_gainset(pusb_device, (__s8)easycap_gain))
SAY("ERROR: audio_gainset() failed\n"); SAY("ERROR: audio_gainset() failed\n");
check_vt(pusb_device); check_vt(pusb_device);
return 0; return 0;
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
#include "easycap_standard.h" #include "easycap_standard.h"
#include "easycap_ioctl.h" #include "easycap_ioctl.h"
int debug; static int easycap_debug;
int bars; static int easycap_bars;
int gain = 16; int easycap_gain = 16;
module_param(debug, int, S_IRUGO | S_IWUSR); module_param_named(debug, easycap_debug, int, S_IRUGO | S_IWUSR);
module_param(bars, int, S_IRUGO | S_IWUSR); module_param_named(bars, easycap_bars, int, S_IRUGO | S_IWUSR);
module_param(gain, int, S_IRUGO | S_IWUSR); module_param_named(gain, easycap_gain, int, S_IRUGO | S_IWUSR);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* /*
...@@ -1464,7 +1464,7 @@ if (peasycap->field_read == peasycap->field_fill) { ...@@ -1464,7 +1464,7 @@ if (peasycap->field_read == peasycap->field_fill) {
easycap_testcard(peasycap, peasycap->field_read); easycap_testcard(peasycap, peasycap->field_read);
#else #else
if (0 <= input && INPUT_MANY > input) { if (0 <= input && INPUT_MANY > input) {
if (bars && VIDEO_LOST_TOLERATE <= peasycap->lost[input]) if (easycap_bars && VIDEO_LOST_TOLERATE <= peasycap->lost[input])
easycap_testcard(peasycap, peasycap->field_read); easycap_testcard(peasycap, peasycap->field_read);
} }
#endif /*EASYCAP_TESTCARD*/ #endif /*EASYCAP_TESTCARD*/
...@@ -5008,8 +5008,8 @@ easycap_module_init(void) ...@@ -5008,8 +5008,8 @@ easycap_module_init(void)
int result; int result;
SAY("========easycap=======\n"); SAY("========easycap=======\n");
JOT(4, "begins. %i=debug %i=bars %i=gain\n", debug, bars, \ JOT(4, "begins. %i=debug %i=bars %i=gain\n", easycap_debug, easycap_bars, \
gain); easycap_gain);
SAY("version: " EASYCAP_DRIVER_VERSION "\n"); SAY("version: " EASYCAP_DRIVER_VERSION "\n");
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment