aboutsummaryrefslogtreecommitdiffstats
path: root/package/switch/src
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-06-26 20:43:41 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-06-26 20:43:41 +0000
commit543d870e824730d0a85e4c999d9c21f58f0737b1 (patch)
tree2517eb31b9594e52382ec5397bbbf41c28c970f3 /package/switch/src
parent08e4d51c29ea57920f6e5f7906b19b19e1c71a50 (diff)
downloadupstream-543d870e824730d0a85e4c999d9c21f58f0737b1.tar.gz
upstream-543d870e824730d0a85e4c999d9c21f58f0737b1.tar.bz2
upstream-543d870e824730d0a85e4c999d9c21f58f0737b1.zip
remove linux 2.4 support from several packages
SVN-Revision: 21954
Diffstat (limited to 'package/switch/src')
-rw-r--r--package/switch/src/switch-core.c10
-rw-r--r--package/switch/src/switch-core.h4
-rw-r--r--package/switch/src/switch-robo.c7
3 files changed, 1 insertions, 20 deletions
diff --git a/package/switch/src/switch-core.c b/package/switch/src/switch-core.c
index 9a8989d7f8..e4a3b10ad5 100644
--- a/package/switch/src/switch-core.c
+++ b/package/switch/src/switch-core.c
@@ -68,12 +68,7 @@ static struct file_operations switch_proc_fops = {
static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos)
{
-#ifdef LINUX_2_4
- struct inode *inode = file->f_dentry->d_inode;
- struct proc_dir_entry *dent = inode->u.generic_ip;
-#else
struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
-#endif
char *page;
int len = 0;
@@ -105,12 +100,7 @@ static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff
static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data)
{
-#ifdef LINUX_2_4
- struct inode *inode = file->f_dentry->d_inode;
- struct proc_dir_entry *dent = inode->u.generic_ip;
-#else
struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
-#endif
char *page;
int ret = -EINVAL;
diff --git a/package/switch/src/switch-core.h b/package/switch/src/switch-core.h
index 31c81f6ed7..c9ab90dde8 100644
--- a/package/switch/src/switch-core.h
+++ b/package/switch/src/switch-core.h
@@ -13,10 +13,6 @@
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#define LINUX_2_4
-#endif
-
typedef int (*switch_handler)(void *driver, char *buf, int nr);
typedef struct {
diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c
index 43e8098b5a..7884bd8b6a 100644
--- a/package/switch/src/switch-robo.c
+++ b/package/switch/src/switch-robo.c
@@ -63,12 +63,7 @@
#define SIOCGETCPHYRD (SIOCDEVPRIVATE + 9)
#define SIOCSETCPHYWR (SIOCDEVPRIVATE + 10)
-/* linux 2.4 does not have 'bool' */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#define bool int
-#endif
-
-/* Only available on brcm-2.4/brcm47xx */
+/* Only available on brcm47xx */
#ifdef BROADCOM
extern char *nvram_get(const char *name);
#define getvar(str) (nvram_get(str)?:"")