From 8570a82f7c494d4da9063235227a72103dfa989a Mon Sep 17 00:00:00 2001 From: noz Date: Wed, 14 May 2008 15:03:05 +0000 Subject: Allow package/switch to compile against 2.6.25 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11138 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/switch/src/switch-robo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'package/switch') diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c index 28d8de326b..045dce1c4b 100644 --- a/package/switch/src/switch-robo.c +++ b/package/switch/src/switch-robo.c @@ -296,7 +296,11 @@ static int robo_probe(char *devname) printk(KERN_INFO PFX "Probing device %s: ", devname); strcpy(robo.ifr.ifr_name, devname); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) if ((robo.dev = dev_get_by_name(devname)) == NULL) { +#else + if ((robo.dev = dev_get_by_name(&init_net, devname)) == NULL) { +#endif printk("No such device\n"); return 1; } -- cgit v1.2.3