From patchwork Thu Aug 20 07:32:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7041391 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 3D7CAC05AC for ; Thu, 20 Aug 2015 07:34:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D79920504 for ; Thu, 20 Aug 2015 07:34:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8856320503 for ; Thu, 20 Aug 2015 07:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752515AbbHTHeN (ORCPT ); Thu, 20 Aug 2015 03:34:13 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:18587 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbbHTHeM (ORCPT ); Thu, 20 Aug 2015 03:34:12 -0400 Received: from tony-ThinkPad-T420.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 20 Aug 2015 09:34:06 +0200 From: Tony Cho To: CC: , , , , , , , , , , , , , Subject: [PATCH 5/5] staging: wilc1000: define undefined operation mode Date: Thu, 20 Aug 2015 16:32:54 +0900 Message-ID: <1440055974-9998-6-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440055974-9998-1-git-send-email-tony.cho@atmel.com> References: <1440055974-9998-1-git-send-email-tony.cho@atmel.com> 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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 4b5e62a..17ecad2 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