From patchwork Tue Sep 8 08:07:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7139041 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AED08BEEC1 for ; Tue, 8 Sep 2015 08:07:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E398D2064D for ; Tue, 8 Sep 2015 08:07:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BBB12064C for ; Tue, 8 Sep 2015 08:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089AbbIHIHn (ORCPT ); Tue, 8 Sep 2015 04:07:43 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:21353 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753949AbbIHIHl (ORCPT ); Tue, 8 Sep 2015 04:07:41 -0400 Received: from tony-itx.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Tue, 8 Sep 2015 10:07:36 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH 1/5] staging: wilc1000: define undefined operation mode Date: Tue, 8 Sep 2015 17:07:59 +0900 Message-ID: <1441699683-31463-1-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johnny Kim 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 --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/host_interface.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8458d8d..8033205 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 349d5f5..a107377 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