Skip to content

Commit 46b8306

Browse files
committed
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>
1 parent 91b1561 commit 46b8306

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/sparc/include/asm/parport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
#define HAS_DMA
2323

24+
#ifdef CONFIG_PARPORT_PC_FIFO
2425
static DEFINE_SPINLOCK(dma_spin_lock);
2526

2627
#define claim_dma_lock() \
@@ -31,6 +32,7 @@ static DEFINE_SPINLOCK(dma_spin_lock);
3132

3233
#define release_dma_lock(__flags) \
3334
spin_unlock_irqrestore(&dma_spin_lock, __flags);
35+
#endif
3436

3537
static struct sparc_ebus_info {
3638
struct ebus_dma_info info;

0 commit comments

Comments
 (0)