summaryrefslogtreecommitdiffstats
path: root/package/switch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-06-26 20:43:41 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-06-26 20:43:41 +0000
commitfef81766d04c20696865e3f93258a01fdad9dedc (patch)
tree27936dc85f4d3dcb24795df04b6753d87810af74 /package/switch
parent75bd418e14e9e323d6e4313800569560b11d1ae5 (diff)
remove linux 2.4 support from several packages
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21954 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/switch')
-rw-r--r--package/switch/Makefile9
-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
4 files changed, 3 insertions, 27 deletions
diff --git a/package/switch/Makefile b/package/switch/Makefile
index 74e42e6d9..7570f56d3 100644
--- a/package/switch/Makefile
+++ b/package/switch/Makefile
@@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/switch
SUBMENU:=Other modules
- DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx||TARGET_brcm63xx
+ DEPENDS:=@TARGET_brcm47xx||TARGET_brcm63xx
TITLE:=Switch drivers
FILES:= \
$(PKG_BUILD_DIR)/switch-core.$(LINUX_KMOD_SUFFIX) \
@@ -33,15 +33,10 @@ define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
-ifeq ($(BOARD),brcm-2.4)
- BUILDFLAGS := -DBROADCOM -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include
-else
- ifeq ($(BOARD),brcm47xx)
+ifeq ($(BOARD),brcm47xx)
BUILDFLAGS := -DBROADCOM
- endif
endif
-
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
diff --git a/package/switch/src/switch-core.c b/package/switch/src/switch-core.c
index 9a8989d7f..e4a3b10ad 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 31c81f6ed..c9ab90dde 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 43e8098b5..7884bd8b6 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)?:"")