Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc: Fix parport build warnings.

If PARPORT_PC_FIFO is not enabled, do not provide the dma lock
macros and lock definition. Otherwise:

./arch/sparc/include/asm/parport.h:24:24: warning: ‘dma_spin_lock’ defined but not used [-Wunused-variable]
static DEFINE_SPINLOCK(dma_spin_lock);
^~~~~~~~~~~~~
./include/linux/spinlock_types.h:81:39: note: in definition of macro ‘DEFINE_SPINLOCK’
#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)

Signed-off-by: David S. Miller <davem@davemloft.net>

+2
+2
arch/sparc/include/asm/parport.h
··· 21 21 */ 22 22 #define HAS_DMA 23 23 24 + #ifdef CONFIG_PARPORT_PC_FIFO 24 25 static DEFINE_SPINLOCK(dma_spin_lock); 25 26 26 27 #define claim_dma_lock() \ ··· 32 31 33 32 #define release_dma_lock(__flags) \ 34 33 spin_unlock_irqrestore(&dma_spin_lock, __flags); 34 + #endif 35 35 36 36 static struct sparc_ebus_info { 37 37 struct ebus_dma_info info;