summaryrefslogtreecommitdiff
path: root/target/linux/amazon/files/arch
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-04-10 15:08:28 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-04-10 15:08:28 +0000
commit126a87196ce4e7ea80c71692c22514f6cb549820 (patch)
tree333f3c15891a91643ba22329bf8622ab4ba87095 /target/linux/amazon/files/arch
parentb722ce28afb482ccdff01d4b28b7adc55f8c2ed6 (diff)
amazon: Upgrade amazon target to kernel 2.6.37
This was just a little bit tested on an SAMSUNG SMT-G3020 and pci and usb do not work like before. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26576 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/amazon/files/arch')
-rw-r--r--target/linux/amazon/files/arch/mips/amazon/dma-core.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/target/linux/amazon/files/arch/mips/amazon/dma-core.c b/target/linux/amazon/files/arch/mips/amazon/dma-core.c
index 6362895f87..8cb4085202 100644
--- a/target/linux/amazon/files/arch/mips/amazon/dma-core.c
+++ b/target/linux/amazon/files/arch/mips/amazon/dma-core.c
@@ -73,6 +73,7 @@ int (*tpe_inject) (void);
#endif // AMAZON_DMA_TPE_AAL5_RECOVERY
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -266,7 +267,7 @@ inline void rx_chan_clear_isr(int chan_no)
#endif
}
-
+#ifdef AMAZON_DMA_TPE_AAL5_RECOVERY
/* Brief: hacking function, this will reset all descriptors back to DMA
*/
static void dma_reset_all_descriptors(int chan_no)
@@ -285,7 +286,6 @@ static void dma_reset_all_descriptors(int chan_no)
}
}
-#ifdef AMAZON_DMA_TPE_AAL5_RECOVERY
/* Brief: Reset DMA descriptors
*/
static void amazon_dma_reset_tpe_rx(int chan_no)
@@ -1344,10 +1344,13 @@ static int dma_release(struct inode *inode, struct file *file)
return 0;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+static long dma_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+#else
static int dma_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+#endif
{
int value = 0;
- int result = 0;
int chan_no = 0;
switch (cmd) {
@@ -1366,7 +1369,7 @@ static int dma_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
default:
break;
}
- return result;
+ return 0;
}
@@ -1374,7 +1377,11 @@ static struct file_operations dma_fops = {
owner:THIS_MODULE,
open:dma_open,
release:dma_release,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ unlocked_ioctl:dma_ioctl,
+#else
ioctl:dma_ioctl,
+#endif
};
static int dma_init(void)