staging: wilc1000: replace ISWILC1000() macro with inline function
Cleanup patch to avoid below checkpatch issue by replacing the macro with inline function. Macro argument 'id' may be better as '(id)' to avoid precedence issues. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e61c7a1caa
commit
2345ef30ea
|
@ -11,6 +11,11 @@
|
||||||
|
|
||||||
static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP;
|
static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP;
|
||||||
|
|
||||||
|
static inline bool is_wilc1000(u32 id)
|
||||||
|
{
|
||||||
|
return ((id & 0xfffff000) == 0x100000 ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
|
static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
|
||||||
{
|
{
|
||||||
mutex_lock(&wilc->hif_cs);
|
mutex_lock(&wilc->hif_cs);
|
||||||
|
@ -794,7 +799,7 @@ static void wilc_pllupdate_isr_ext(struct wilc *wilc, u32 int_stats)
|
||||||
else
|
else
|
||||||
mdelay(WILC_PLL_TO_SPI);
|
mdelay(WILC_PLL_TO_SPI);
|
||||||
|
|
||||||
while (!(ISWILC1000(wilc_get_chipid(wilc, true)) && --trials))
|
while (!(is_wilc1000(wilc_get_chipid(wilc, true)) && --trials))
|
||||||
mdelay(1);
|
mdelay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1294,7 +1299,7 @@ u32 wilc_get_chipid(struct wilc *wilc, bool update)
|
||||||
if (chipid == 0 || update) {
|
if (chipid == 0 || update) {
|
||||||
wilc->hif_func->hif_read_reg(wilc, 0x1000, &tempchipid);
|
wilc->hif_func->hif_read_reg(wilc, 0x1000, &tempchipid);
|
||||||
wilc->hif_func->hif_read_reg(wilc, 0x13f4, &rfrevid);
|
wilc->hif_func->hif_read_reg(wilc, 0x13f4, &rfrevid);
|
||||||
if (!ISWILC1000(tempchipid)) {
|
if (!is_wilc1000(tempchipid)) {
|
||||||
chipid = 0;
|
chipid = 0;
|
||||||
return chipid;
|
return chipid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
#define ISWILC1000(id) ((id & 0xfffff000) == 0x100000 ? 1 : 0)
|
|
||||||
|
|
||||||
/********************************************
|
/********************************************
|
||||||
*
|
*
|
||||||
* Mac eth header length
|
* Mac eth header length
|
||||||
|
|
Loading…
Reference in New Issue