aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-03-23 16:05:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 17:54:22 -0400
commit01f5e0322d5e04049f0b1fb5d747d088dec45241 (patch)
treee2effe7c6a32c53ea4c094815ae6b5b5ba1b181f
parent85df0b85205a716feeaea7caecbb274d422d3b7b (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.c50
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
151const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 140static const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
152 141
153u8 bVarIn1_l; 142static u8 bVarIn1_l;
154u8 bVarOut1_l; 143static u8 bVarOut1_l;
155u8 bVarOut1Old_l; 144static u8 bVarOut1Old_l;
156u8 bModeSelect_l; // state of the pushbuttons to select the mode 145static u8 bModeSelect_l; // state of the pushbuttons to select the mode
157u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed 146static u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed
158u8 bSpeedSelectOld_l; // old state of the pushbuttons 147static u8 bSpeedSelectOld_l; // old state of the pushbuttons
159u32 dwLeds_l; // current state of all LEDs 148static u32 dwLeds_l; // current state of all LEDs
160u8 bLedsRow1_l; // current state of the LEDs in row 1 149static u8 bLedsRow1_l; // current state of the LEDs in row 1
161u8 bLedsRow2_l; // current state of the LEDs in row 2 150static u8 bLedsRow2_l; // current state of the LEDs in row 2
162u8 abSelect_l[3]; // pushbuttons from CNs 151static u8 abSelect_l[3]; // pushbuttons from CNs
163 152
164u32 dwMode_l; // current mode 153static u32 dwMode_l; // current mode
165int iCurCycleCount_l; // current cycle count 154static int iCurCycleCount_l; // current cycle count
166int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step) 155static int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step)
167int iToggle; // indicates the light movement direction 156static int iToggle; // indicates the light movement direction
168 157
169u8 abDomain_l[3000]; 158//static u8 abDomain_l[3000];
170 159
171static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff 160static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff
172static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE); 161static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE);
@@ -196,15 +185,11 @@ tEplKernel AppCbEvent(tEplApiEventType EventType_p, // IN: event type (enum)
196 185
197tEplKernel AppCbSync(void); 186tEplKernel AppCbSync(void);
198 187
199static int __init EplLinInit(void);
200static void __exit EplLinExit(void);
201 188
202//--------------------------------------------------------------------------- 189//---------------------------------------------------------------------------
203// Kernel Module specific Data Structures 190// Kernel Module specific Data Structures
204//--------------------------------------------------------------------------- 191//---------------------------------------------------------------------------
205 192
206EXPORT_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
234static int __init EplLinInit(void) 220static 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 //