]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: wilc1000: define undefined operation mode
authorJohnny Kim <johnny.kim@atmel.com>
Tue, 8 Sep 2015 08:07:59 +0000 (17:07 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:45 +0000 (18:24 -0700)
This patch adds new define, IDLE_MODE to change comparison statement which
is wrong due to typecasting to null.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/host_interface.h

index 8458d8d40232b86abd74df4b6412e8845553eac2..80332054319d507492097cef8700b3ba7b48dbb6 100644 (file)
@@ -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);
 
 
index 349d5f5cd919043280a604d27440778c8d213496..a107377ff6ecc6cda32d0d09d39cce45c243e4ac 100644 (file)
@@ -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