提交 c31799ba 编写于 作者: S Sven Van Asbroeck 提交者: Jakub Kicinski

lan743x: clean up software_isr function

For no apparent reason, this function reads the INT_STS register, and
checks if the software interrupt bit is set. These things have already
been carried out by this function's only caller.

Clean up by removing the redundant code.

Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # lan7430
Signed-off-by: NSven Van Asbroeck <thesven73@gmail.com>
Link: https://lore.kernel.org/r/20201123191529.14908-1-TheSven73@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 da43f0aa
......@@ -140,18 +140,13 @@ static int lan743x_csr_init(struct lan743x_adapter *adapter)
return result;
}
static void lan743x_intr_software_isr(void *context)
static void lan743x_intr_software_isr(struct lan743x_adapter *adapter)
{
struct lan743x_adapter *adapter = context;
struct lan743x_intr *intr = &adapter->intr;
u32 int_sts;
int_sts = lan743x_csr_read(adapter, INT_STS);
if (int_sts & INT_BIT_SW_GP_) {
/* disable the interrupt to prevent repeated re-triggering */
lan743x_csr_write(adapter, INT_EN_CLR, INT_BIT_SW_GP_);
intr->software_isr_flag = 1;
}
/* disable the interrupt to prevent repeated re-triggering */
lan743x_csr_write(adapter, INT_EN_CLR, INT_BIT_SW_GP_);
intr->software_isr_flag = 1;
}
static void lan743x_tx_isr(void *context, u32 int_sts, u32 flags)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册