[media] nuvoton-cir: simplify nvt_cir_tx_inactive

Simplify nvt_cir_tx_inactive.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Heiner Kallweit 2015-12-30 14:39:41 -02:00 committed by Mauro Carvalho Chehab
parent 7a89836e99
commit 1feac493b0
1 changed files with 1 additions and 4 deletions

View File

@ -742,16 +742,13 @@ static void nvt_cir_log_irqs(u8 status, u8 iren)
static bool nvt_cir_tx_inactive(struct nvt_dev *nvt) static bool nvt_cir_tx_inactive(struct nvt_dev *nvt)
{ {
unsigned long flags; unsigned long flags;
bool tx_inactive;
u8 tx_state; u8 tx_state;
spin_lock_irqsave(&nvt->tx.lock, flags); spin_lock_irqsave(&nvt->tx.lock, flags);
tx_state = nvt->tx.tx_state; tx_state = nvt->tx.tx_state;
spin_unlock_irqrestore(&nvt->tx.lock, flags); spin_unlock_irqrestore(&nvt->tx.lock, flags);
tx_inactive = (tx_state == ST_TX_NONE); return tx_state == ST_TX_NONE;
return tx_inactive;
} }
/* interrupt service routine for incoming and outgoing CIR data */ /* interrupt service routine for incoming and outgoing CIR data */