Skip to content

Commit

Permalink
sparc: Fix parport build warnings.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Oct 19, 2018
1 parent 91b1561 commit 46b8306
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sparc/include/asm/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
#define HAS_DMA

#ifdef CONFIG_PARPORT_PC_FIFO
static DEFINE_SPINLOCK(dma_spin_lock);

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

#define release_dma_lock(__flags) \
spin_unlock_irqrestore(&dma_spin_lock, __flags);
#endif

static struct sparc_ebus_info {
struct ebus_dma_info info;
Expand Down

0 comments on commit 46b8306

Please sign in to comment.