Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=74bd7d093b8e87f35eaf3b14459b96a0e20d1d10
Commit:     74bd7d093b8e87f35eaf3b14459b96a0e20d1d10
Parent:     5f1ef5108a7a5e9fc220f73352eb7b428a2499d5
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 28 13:09:34 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Feb 28 13:09:34 2007 -0800

    [SPARC64]: Fix parport_pc build.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/asm-sparc64/dma.h     |    4 ----
 include/asm-sparc64/parport.h |   22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h
index 93e5a06..1bf4f7a 100644
--- a/include/asm-sparc64/dma.h
+++ b/include/asm-sparc64/dma.h
@@ -205,10 +205,6 @@ do {       u32 tmp = sbus_readl((__regs) + DMA_CSR); \
 #define for_each_dvma(dma) \
         for((dma) = dma_chain; (dma); (dma) = (dma)->next)
 
-extern int get_dma_list(char *);
-extern int request_dma(unsigned int, __const__ char *);
-extern void free_dma(unsigned int);
-
 /* From PCI */
 
 #ifdef CONFIG_PCI
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index d389587..be9509c 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -23,8 +23,30 @@ static struct sparc_ebus_info {
        struct ebus_dma_info info;
        unsigned int addr;
        unsigned int count;
+       int lock;
 } sparc_ebus_dmas[PARPORT_PC_MAX_PORTS];
 
+static __inline__ int request_dma(unsigned int dmanr, const char *device_id)
+{
+       if (dmanr >= PARPORT_PC_MAX_PORTS)
+               return -EINVAL;
+       if (xchg(&sparc_ebus_dmas[dmanr].lock, 1) != 0)
+               return -EBUSY;
+       return 0;
+}
+
+static __inline__ void free_dma(unsigned int dmanr)
+{
+       if (dmanr >= PARPORT_PC_MAX_PORTS) {
+               printk(KERN_WARNING "Trying to free DMA%d\n", dmanr);
+               return;
+       }
+       if (xchg(&sparc_ebus_dmas[dmanr].lock, 0) == 0) {
+               printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr);
+               return;
+       }       
+}
+
 static __inline__ void enable_dma(unsigned int dmanr)
 {
        ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to