mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
Fix chip/imxrt_enc.c:950:27: error: use of logical '&&' with constant operand
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
4913552140
commit
9a50c30168
1 changed files with 2 additions and 3 deletions
|
|
@ -951,7 +951,7 @@ static int imxrt_setup(struct qe_lowerhalf_s *lower)
|
|||
imxrt_enc_putreg16(priv, IMXRT_ENC_TST_OFFSET, regval);
|
||||
#endif
|
||||
|
||||
if ((config->init_flags && XIE_SHIFT) == 1)
|
||||
if (((config->init_flags >> XIE_SHIFT) & 1) != 0)
|
||||
{
|
||||
ret = irq_attach(config->irq, imxrt_enc_index, priv);
|
||||
if (ret < 0)
|
||||
|
|
@ -1011,10 +1011,9 @@ static int imxrt_shutdown(struct qe_lowerhalf_s *lower)
|
|||
|
||||
/* Disable interrupts if used */
|
||||
|
||||
if ((priv->config->init_flags && XIE_SHIFT) == 1)
|
||||
if (((priv->config->init_flags >> XIE_SHIFT) & 1) != 0)
|
||||
{
|
||||
up_disable_irq(priv->config->irq);
|
||||
|
||||
irq_detach(priv->config->irq);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue