Loading arch/mips/alchemy/common/dbdma.c +56 −55 Original line number Diff line number Diff line Loading @@ -237,7 +237,7 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, void (*callback)(int, void *), void *callparam) { unsigned long flags; u32 used, chan, rv; u32 used, chan; u32 dcp; int i; dbdev_tab_t *stp, *dtp; Loading @@ -260,7 +260,6 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, return 0; used = 0; rv = 0; /* Check to see if we can get both channels. */ spin_lock_irqsave(&au1xxx_dbdma_spin_lock, flags); Loading @@ -281,7 +280,9 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, used++; spin_unlock_irqrestore(&au1xxx_dbdma_spin_lock, flags); if (!used) { if (used) return 0; /* Let's see if we can allocate a channel for it. */ ctp = NULL; chan = 0; Loading Loading @@ -326,18 +327,18 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, cp->ddma_cfg = i; au_sync(); /* Return a non-zero value that can be used to * find the channel information in subsequent * operations. /* * Return a non-zero value that can be used to find the channel * information in subsequent operations. */ rv = (u32)(&chan_tab_ptr[chan]); } else { return (u32)(&chan_tab_ptr[chan]); } /* Release devices */ stp->dev_flags &= ~DEV_FLAGS_INUSE; dtp->dev_flags &= ~DEV_FLAGS_INUSE; } } return rv; return 0; } EXPORT_SYMBOL(au1xxx_dbdma_chan_alloc); Loading Loading
arch/mips/alchemy/common/dbdma.c +56 −55 Original line number Diff line number Diff line Loading @@ -237,7 +237,7 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, void (*callback)(int, void *), void *callparam) { unsigned long flags; u32 used, chan, rv; u32 used, chan; u32 dcp; int i; dbdev_tab_t *stp, *dtp; Loading @@ -260,7 +260,6 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, return 0; used = 0; rv = 0; /* Check to see if we can get both channels. */ spin_lock_irqsave(&au1xxx_dbdma_spin_lock, flags); Loading @@ -281,7 +280,9 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, used++; spin_unlock_irqrestore(&au1xxx_dbdma_spin_lock, flags); if (!used) { if (used) return 0; /* Let's see if we can allocate a channel for it. */ ctp = NULL; chan = 0; Loading Loading @@ -326,18 +327,18 @@ u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, cp->ddma_cfg = i; au_sync(); /* Return a non-zero value that can be used to * find the channel information in subsequent * operations. /* * Return a non-zero value that can be used to find the channel * information in subsequent operations. */ rv = (u32)(&chan_tab_ptr[chan]); } else { return (u32)(&chan_tab_ptr[chan]); } /* Release devices */ stp->dev_flags &= ~DEV_FLAGS_INUSE; dtp->dev_flags &= ~DEV_FLAGS_INUSE; } } return rv; return 0; } EXPORT_SYMBOL(au1xxx_dbdma_chan_alloc); Loading