aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWolfgang Ocker <weo@reccoware.de>2008-02-10 20:31:33 +0100
committerRalf Baechle <ralf@linux-mips.org>2008-03-12 14:14:40 +0000
commit0ec734c2b8b005667ffdaef8610d1024630683b0 (patch)
tree8e39253f9d521bb45bf59546a8c15eb41246cb11 /arch
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 (diff)
downloadlinux-dev-0ec734c2b8b005667ffdaef8610d1024630683b0.tar.xz
linux-dev-0ec734c2b8b005667ffdaef8610d1024630683b0.zip
[MIPS] Alchemy: Fix ids in Alchemy db dma device table
0 is a valid device id (DSCR_CMD0_UART0_TX), so we can't use it to mark an empty entry in the device table. Use ~0 instead and search for id ~0 when looking for a free entry. Signed-off-by: Wolfgang Ocker <weo@reccoware.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/au1000/common/dbdma.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index 428ed275a0f6..57f17b41098d 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -161,22 +161,22 @@ static dbdev_tab_t dbdev_tab[] = {
{ DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
/* Provide 16 user definable device types */
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
+ { ~0, 0, 0, 0, 0, 0, 0 },
};
#define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab)
@@ -209,7 +209,7 @@ au1xxx_ddma_add_device(dbdev_tab_t *dev)
dbdev_tab_t *p=NULL;
static u16 new_id=0x1000;
- p = find_dbdev_id(0);
+ p = find_dbdev_id(~0);
if ( NULL != p )
{
memcpy(p, dev, sizeof(dbdev_tab_t));