[ar7] add support for new ar7-atm version D7.05.00.00 (#6515)
[openwrt.git] / package / ar7-atm / patches-D7.05.01.00 / 170-bus_id_removal.patch
diff --git a/package/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch b/package/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch
new file mode 100644 (file)
index 0000000..9cafa5e
--- /dev/null
@@ -0,0 +1,32 @@
+Index: sangam_atm-D7.05.01.00/tn7dsl.c
+===================================================================
+--- sangam_atm-D7.05.01.00.orig/tn7dsl.c       2010-03-07 18:18:39.000000000 +0100
++++ sangam_atm-D7.05.01.00/tn7dsl.c    2010-03-07 18:19:04.000000000 +0100
+@@ -117,6 +117,7 @@
+ #include <linux/vmalloc.h>
+ #include <linux/file.h>
+ #include <linux/firmware.h>
++#include <linux/version.h>
+ #include <asm/io.h>
+ #include <asm/ar7/ar7.h>
+@@ -492,7 +493,9 @@
+ }
+ static struct device avsar = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+       .bus_id    = "vlynq",
++#endif
+       .release   = avsar_release,
+ };
+@@ -501,6 +504,9 @@
+       const struct firmware *fw_entry;
+       size_t size;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
++      dev_set_name(&avsar, "avsar");
++#endif
+       printk("requesting firmware image \"ar0700xx.bin\"\n");
+       if(device_register(&avsar) < 0) {
+               printk(KERN_ERR