diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-23 16:05:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 17:54:22 -0400 |
commit | 01f5e0322d5e04049f0b1fb5d747d088dec45241 (patch) | |
tree | e2effe7c6a32c53ea4c094815ae6b5b5ba1b181f | |
parent | 85df0b85205a716feeaea7caecbb274d422d3b7b (diff) |
Staging: epl: clean up demo_main.c
Fix some static symbols and drop the kernel version checks.
Also comment out the init and exit functions, as they don't get used
anymore.
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/epl/demo_main.c | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/drivers/staging/epl/demo_main.c b/drivers/staging/epl/demo_main.c index 74ab74f80f94..7ad10fc2b1d0 100644 --- a/drivers/staging/epl/demo_main.c +++ b/drivers/staging/epl/demo_main.c | |||
@@ -74,7 +74,6 @@ | |||
74 | #include <linux/init.h> | 74 | #include <linux/init.h> |
75 | #include <linux/errno.h> | 75 | #include <linux/errno.h> |
76 | #include <linux/major.h> | 76 | #include <linux/major.h> |
77 | #include <linux/version.h> | ||
78 | #include <asm/io.h> | 77 | #include <asm/io.h> |
79 | #include <asm/uaccess.h> | 78 | #include <asm/uaccess.h> |
80 | #include <asm/atomic.h> | 79 | #include <asm/atomic.h> |
@@ -87,16 +86,6 @@ | |||
87 | #include "Epl.h" | 86 | #include "Epl.h" |
88 | #include "proc_fs.h" | 87 | #include "proc_fs.h" |
89 | 88 | ||
90 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) | ||
91 | // remove ("make invisible") obsolete symbols for kernel versions 2.6 | ||
92 | // and higher | ||
93 | #define MOD_INC_USE_COUNT | ||
94 | #define MOD_DEC_USE_COUNT | ||
95 | #define EXPORT_NO_SYMBOLS | ||
96 | #else | ||
97 | #error "This driver needs a 2.6.x kernel or higher" | ||
98 | #endif | ||
99 | |||
100 | /***************************************************************************/ | 89 | /***************************************************************************/ |
101 | /* */ | 90 | /* */ |
102 | /* */ | 91 | /* */ |
@@ -148,25 +137,25 @@ void TgtDbgSignalTracePoint(u8 bTracePointNumber_p); | |||
148 | // modul globale vars | 137 | // modul globale vars |
149 | //--------------------------------------------------------------------------- | 138 | //--------------------------------------------------------------------------- |
150 | 139 | ||
151 | const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | 140 | static const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
152 | 141 | ||
153 | u8 bVarIn1_l; | 142 | static u8 bVarIn1_l; |
154 | u8 bVarOut1_l; | 143 | static u8 bVarOut1_l; |
155 | u8 bVarOut1Old_l; | 144 | static u8 bVarOut1Old_l; |
156 | u8 bModeSelect_l; // state of the pushbuttons to select the mode | 145 | static u8 bModeSelect_l; // state of the pushbuttons to select the mode |
157 | u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed | 146 | static u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed |
158 | u8 bSpeedSelectOld_l; // old state of the pushbuttons | 147 | static u8 bSpeedSelectOld_l; // old state of the pushbuttons |
159 | u32 dwLeds_l; // current state of all LEDs | 148 | static u32 dwLeds_l; // current state of all LEDs |
160 | u8 bLedsRow1_l; // current state of the LEDs in row 1 | 149 | static u8 bLedsRow1_l; // current state of the LEDs in row 1 |
161 | u8 bLedsRow2_l; // current state of the LEDs in row 2 | 150 | static u8 bLedsRow2_l; // current state of the LEDs in row 2 |
162 | u8 abSelect_l[3]; // pushbuttons from CNs | 151 | static u8 abSelect_l[3]; // pushbuttons from CNs |
163 | 152 | ||
164 | u32 dwMode_l; // current mode | 153 | static u32 dwMode_l; // current mode |
165 | int iCurCycleCount_l; // current cycle count | 154 | static int iCurCycleCount_l; // current cycle count |
166 | int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step) | 155 | static int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step) |
167 | int iToggle; // indicates the light movement direction | 156 | static int iToggle; // indicates the light movement direction |
168 | 157 | ||
169 | u8 abDomain_l[3000]; | 158 | //static u8 abDomain_l[3000]; |
170 | 159 | ||
171 | static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff | 160 | static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff |
172 | static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE); | 161 | static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE); |
@@ -196,15 +185,11 @@ tEplKernel AppCbEvent(tEplApiEventType EventType_p, // IN: event type (enum) | |||
196 | 185 | ||
197 | tEplKernel AppCbSync(void); | 186 | tEplKernel AppCbSync(void); |
198 | 187 | ||
199 | static int __init EplLinInit(void); | ||
200 | static void __exit EplLinExit(void); | ||
201 | 188 | ||
202 | //--------------------------------------------------------------------------- | 189 | //--------------------------------------------------------------------------- |
203 | // Kernel Module specific Data Structures | 190 | // Kernel Module specific Data Structures |
204 | //--------------------------------------------------------------------------- | 191 | //--------------------------------------------------------------------------- |
205 | 192 | ||
206 | EXPORT_NO_SYMBOLS; | ||
207 | |||
208 | //module_init(EplLinInit); | 193 | //module_init(EplLinInit); |
209 | //module_exit(EplLinExit); | 194 | //module_exit(EplLinExit); |
210 | 195 | ||
@@ -231,6 +216,7 @@ EXPORT_NO_SYMBOLS; | |||
231 | // State: | 216 | // State: |
232 | // | 217 | // |
233 | //--------------------------------------------------------------------------- | 218 | //--------------------------------------------------------------------------- |
219 | #if 0 | ||
234 | static int __init EplLinInit(void) | 220 | static int __init EplLinInit(void) |
235 | { | 221 | { |
236 | tEplKernel EplRet; | 222 | tEplKernel EplRet; |
@@ -456,7 +442,7 @@ static void __exit EplLinExit(void) | |||
456 | printk("EplLinProcFree(): 0x%X\n", EplRet); | 442 | printk("EplLinProcFree(): 0x%X\n", EplRet); |
457 | 443 | ||
458 | } | 444 | } |
459 | 445 | #endif | |
460 | //=========================================================================// | 446 | //=========================================================================// |
461 | // // | 447 | // // |
462 | // P R I V A T E F U N C T I O N S // | 448 | // P R I V A T E F U N C T I O N S // |