Commit 773b4869 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: fix line over 80 chars in wilc_spi_clear_int_ext()

Refactor wilc_spi_clear_int_ext() to fix the "line over 80 char" issue
reported by checkpatch.pl script.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 12ec07a4
...@@ -988,12 +988,14 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val) ...@@ -988,12 +988,14 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
{ {
struct spi_device *spi = to_spi_device(wilc->dev); struct spi_device *spi = to_spi_device(wilc->dev);
int ret; int ret;
u32 flags;
u32 tbl_ctl;
if (g_spi.has_thrpt_enh) { if (g_spi.has_thrpt_enh) {
ret = spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE, ret = spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE,
val); val);
} else { return ret;
u32 flags; }
flags = val & (BIT(MAX_NUM_INT) - 1); flags = val & (BIT(MAX_NUM_INT) - 1);
if (flags) { if (flags) {
...@@ -1006,7 +1008,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val) ...@@ -1006,7 +1008,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
* it will clear interrupt. * it will clear interrupt.
*/ */
if (flags & 1) if (flags & 1)
ret = wilc_spi_write_reg(wilc, 0x10c8 + i * 4, 1); ret = wilc_spi_write_reg(wilc,
0x10c8 + i * 4, 1);
if (!ret) if (!ret)
break; break;
flags >>= 1; flags >>= 1;
...@@ -1026,9 +1029,6 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val) ...@@ -1026,9 +1029,6 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
} }
} }
{
u32 tbl_ctl;
tbl_ctl = 0; tbl_ctl = 0;
/* select VMM table 0 */ /* select VMM table 0 */
if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0) if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
...@@ -1037,11 +1037,9 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val) ...@@ -1037,11 +1037,9 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1) if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
tbl_ctl |= BIT(1); tbl_ctl |= BIT(1);
ret = wilc_spi_write_reg(wilc, WILC_VMM_TBL_CTL, ret = wilc_spi_write_reg(wilc, WILC_VMM_TBL_CTL, tbl_ctl);
tbl_ctl);
if (!ret) { if (!ret) {
dev_err(&spi->dev, dev_err(&spi->dev, "fail write reg vmm_tbl_ctl...\n");
"fail write reg vmm_tbl_ctl...\n");
goto _fail_; goto _fail_;
} }
...@@ -1049,15 +1047,12 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val) ...@@ -1049,15 +1047,12 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
/* /*
* enable vmm transfer. * enable vmm transfer.
*/ */
ret = wilc_spi_write_reg(wilc, ret = wilc_spi_write_reg(wilc, WILC_VMM_CORE_CTL, 1);
WILC_VMM_CORE_CTL, 1);
if (!ret) { if (!ret) {
dev_err(&spi->dev, "fail write reg vmm_core_ctl...\n"); dev_err(&spi->dev, "fail write reg vmm_core_ctl...\n");
goto _fail_; goto _fail_;
} }
} }
}
}
_fail_: _fail_:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment