diff options
author | Tamara Diaconita <diaconitatamara@gmail.com> | 2017-03-14 14:10:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-16 11:47:41 +0900 |
commit | 5844e42c291242145133e773139ac187e09d0f78 (patch) | |
tree | becaa75a005970b591464b3711658ba487e25a30 /drivers/staging/wilc1000 | |
parent | f15e60ce4ee90b713e1d84653c715dc8fa0d49ec (diff) |
staging: wilc1000: Declare variables to top of function
Move declaration of variables to top of function to make the code more
readable.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/wilc_spi.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 0363b0869516..14c3529a27ca 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -927,14 +927,16 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status) { struct spi_device *spi = to_spi_device(wilc->dev); int ret; + u32 tmp; + u32 byte_cnt; + int happended, j; + u32 unknown_mask; + u32 irq_flags; if (g_spi.has_thrpt_enh) { ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE, int_status); } else { - u32 tmp; - u32 byte_cnt; - ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, &byte_cnt); if (!ret) { @@ -945,12 +947,8 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status) tmp = (byte_cnt >> 2) & IRQ_DMA_WD_CNT_MASK; { - int happended, j; - j = 0; do { - u32 irq_flags; - happended = 0; wilc_spi_read_reg(wilc, 0x1a90, &irq_flags); @@ -963,8 +961,6 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status) } { - u32 unknown_mask; - unknown_mask = ~((1ul << g_spi.nint) - 1); if ((tmp >> IRG_FLAGS_OFFSET) & unknown_mask) { |