From: Johnny Kim Date: Tue, 8 Sep 2015 08:07:59 +0000 (+0900) Subject: staging: wilc1000: define undefined operation mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c590b9a4c0ec5e3a545887dc83e96466c493613e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: wilc1000: define undefined operation mode This patch adds new define, IDLE_MODE to change comparison statement which is wrong due to typecasting to null. Signed-off-by: Johnny Kim Signed-off-by: Tony Cho Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8458d8d40232..80332054319d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -754,7 +754,7 @@ static s32 Handle_SetOperationMode(tstrWILC_WFIDrv *drvHandler, tstrHostIfSetOpe get_id_from_handler(pstrWFIDrv)); - if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL) + if ((pstrHostIfSetOperationMode->u32Mode) == IDLE_MODE) up(&hSemDeinitDrvHandle); diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 349d5f5cd919..a107377ff6ec 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -23,6 +23,7 @@ #define BIT1 ((u32)(1 << 1)) #define BIT0 ((u32)(1 << 0)) +#define IDLE_MODE 0x00 #define AP_MODE 0x01 #define STATION_MODE 0x02 #define GO_MODE 0x03