]> err.no Git - linux-2.6/blobdiff - include/asm-sparc64/parport.h
[SPARC]: Implement fb_is_primary_device().
[linux-2.6] / include / asm-sparc64 / parport.h
index be9509c8f8c10bc9dcaf54e91e4aae52c265d36d..23cc63f049a896769f4ed62e8d6ef8044f57d817 100644 (file)
  */
 #define HAS_DMA
 
+static DEFINE_SPINLOCK(dma_spin_lock);
+
+#define claim_dma_lock() \
+({     unsigned long flags; \
+       spin_lock_irqsave(&dma_spin_lock, flags); \
+       flags; \
+})
+
+#define release_dma_lock(__flags) \
+       spin_unlock_irqrestore(&dma_spin_lock, __flags);
+
 static struct sparc_ebus_info {
        struct ebus_dma_info info;
        unsigned int addr;
@@ -92,7 +103,7 @@ static int ebus_ecpp_p(struct linux_ebus_device *edev)
        if (!strcmp(edev->prom_node->name, "ecpp"))
                return 1;
        if (!strcmp(edev->prom_node->name, "parallel")) {
-               char *compat;
+               const char *compat;
 
                compat = of_get_property(edev->prom_node,
                                         "compatible", NULL);
@@ -134,7 +145,7 @@ static int parport_isa_probe(int count)
                         */
                        if (parport_pc_probe_port(base, base + 0x400,
                                                  child->irq, PARPORT_DMA_NOFIFO,
-                                                 child->bus->self))
+                                                 &child->bus->self->dev))
                                count++;
                }
        }
@@ -188,7 +199,8 @@ static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
 
                                if (parport_pc_probe_port(base, base + 0x400,
                                                          edev->irqs[0],
-                                                         count, ebus->self))
+                                                         count,
+                                                         &ebus->self->dev))
                                        count++;
                        }
                }