Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+18 -32
+18 -32
drivers/staging/epl/demo_main.c
··· 74 74 #include <linux/init.h> 75 75 #include <linux/errno.h> 76 76 #include <linux/major.h> 77 - #include <linux/version.h> 78 77 #include <asm/io.h> 79 78 #include <asm/uaccess.h> 80 79 #include <asm/atomic.h> ··· 85 86 86 87 #include "Epl.h" 87 88 #include "proc_fs.h" 88 - 89 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 90 - // remove ("make invisible") obsolete symbols for kernel versions 2.6 91 - // and higher 92 - #define MOD_INC_USE_COUNT 93 - #define MOD_DEC_USE_COUNT 94 - #define EXPORT_NO_SYMBOLS 95 - #else 96 - #error "This driver needs a 2.6.x kernel or higher" 97 - #endif 98 89 99 90 /***************************************************************************/ 100 91 /* */ ··· 137 148 // modul globale vars 138 149 //--------------------------------------------------------------------------- 139 150 140 - const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 151 + static const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 141 152 142 - u8 bVarIn1_l; 143 - u8 bVarOut1_l; 144 - u8 bVarOut1Old_l; 145 - u8 bModeSelect_l; // state of the pushbuttons to select the mode 146 - u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed 147 - u8 bSpeedSelectOld_l; // old state of the pushbuttons 148 - u32 dwLeds_l; // current state of all LEDs 149 - u8 bLedsRow1_l; // current state of the LEDs in row 1 150 - u8 bLedsRow2_l; // current state of the LEDs in row 2 151 - u8 abSelect_l[3]; // pushbuttons from CNs 153 + static u8 bVarIn1_l; 154 + static u8 bVarOut1_l; 155 + static u8 bVarOut1Old_l; 156 + static u8 bModeSelect_l; // state of the pushbuttons to select the mode 157 + static u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed 158 + static u8 bSpeedSelectOld_l; // old state of the pushbuttons 159 + static u32 dwLeds_l; // current state of all LEDs 160 + static u8 bLedsRow1_l; // current state of the LEDs in row 1 161 + static u8 bLedsRow2_l; // current state of the LEDs in row 2 162 + static u8 abSelect_l[3]; // pushbuttons from CNs 152 163 153 - u32 dwMode_l; // current mode 154 - int iCurCycleCount_l; // current cycle count 155 - int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step) 156 - int iToggle; // indicates the light movement direction 164 + static u32 dwMode_l; // current mode 165 + static int iCurCycleCount_l; // current cycle count 166 + static int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step) 167 + static int iToggle; // indicates the light movement direction 157 168 158 - u8 abDomain_l[3000]; 169 + //static u8 abDomain_l[3000]; 159 170 160 171 static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff 161 172 static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE); ··· 185 196 186 197 tEplKernel AppCbSync(void); 187 198 188 - static int __init EplLinInit(void); 189 - static void __exit EplLinExit(void); 190 199 191 200 //--------------------------------------------------------------------------- 192 201 // Kernel Module specific Data Structures 193 202 //--------------------------------------------------------------------------- 194 - 195 - EXPORT_NO_SYMBOLS; 196 203 197 204 //module_init(EplLinInit); 198 205 //module_exit(EplLinExit); ··· 216 231 // State: 217 232 // 218 233 //--------------------------------------------------------------------------- 234 + #if 0 219 235 static int __init EplLinInit(void) 220 236 { 221 237 tEplKernel EplRet; ··· 442 456 printk("EplLinProcFree(): 0x%X\n", EplRet); 443 457 444 458 } 445 - 459 + #endif 446 460 //=========================================================================// 447 461 // // 448 462 // P R I V A T E F U N C T I O N S //