From patchwork Thu Jun 2 04:57:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binoy Jayan X-Patchwork-Id: 69123 Delivered-To: patch@linaro.org Received: by 10.140.23.41 with SMTP id 38csp143277qgo; Wed, 1 Jun 2016 21:58:57 -0700 (PDT) X-Received: by 10.66.255.7 with SMTP id am7mr2765971pad.75.1464843534988; Wed, 01 Jun 2016 21:58:54 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g82si55737937pfj.143.2016.06.01.21.58.54; Wed, 01 Jun 2016 21:58:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751968AbcFBE6l (ORCPT + 30 others); Thu, 2 Jun 2016 00:58:41 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34837 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751473AbcFBE6j (ORCPT ); Thu, 2 Jun 2016 00:58:39 -0400 Received: by mail-pf0-f181.google.com with SMTP id g64so26591819pfb.2 for ; Wed, 01 Jun 2016 21:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WtHeVNESMXWNrwGHjbg69I+qQJ2zch6FvBkNr8u+caw=; b=fW/XuSAZLJ6D2qOd+0fjpxFK8l9pb/fFzIQGEDId5IBHWZiqf/ageTMPgKaIZW/X97 cf6CMXGMqYCnlcatx1JVrdP9VbFq9ZVooQdOwb2Mvk35yuyOFhyFC/4PCfuIIt0kQyFP ukK+1Dea9JpijIyLHCUNQmawFoSlwgMe/BzuA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WtHeVNESMXWNrwGHjbg69I+qQJ2zch6FvBkNr8u+caw=; b=D3um+meiCGP7Z8KHwRlxb8zb2Fm7buwM94a9IJv2aJGVgrWnjnIhdL1aelb5f+eddr YJTz1JkrilDDIaCSruHZwBuJTdKCfOP3qzRgoxPCjquok6qMr4XKcv70bidF/6ZS3+E1 XSdqGvc+3xCAc3aJ08DjuVWYJ70R64LjkgDmET/sXT6Kk2+ZCoPc8uoa6hST2UDzwcs9 17Q6xY0YZvI8+vkKX4Zcv8LN60Fdtsirt3ismejav35zLPAC6yKfx7m9YdbUxkui+gm7 YGl3pmkUZPN7/EcZ0LTwEa0G1dO7AKd2BwlUwr7LelICudFEjLOl90vSrTx3Z+rSjXm/ Lmxw== X-Gm-Message-State: ALyK8tICiSi/r+DTlhykpycZhkENFJsh97V1cNXKfx27FUI4Xw00u/NNo0uNr0mJTBh1W931 X-Received: by 10.98.72.219 with SMTP id q88mr950833pfi.6.1464843519100; Wed, 01 Jun 2016 21:58:39 -0700 (PDT) Received: from blr-ubuntu-59.ap.qualcomm.com ([202.46.23.61]) by smtp.gmail.com with ESMTPSA id o64sm17622964pfb.76.2016.06.01.21.58.36 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 21:58:38 -0700 (PDT) From: Binoy Jayan To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Binoy Jayan Subject: [PATCH 4/4] rtl8192u: Replace semaphore rf_sem with mutex Date: Thu, 2 Jun 2016 10:27:55 +0530 Message-Id: <1464843475-4870-5-git-send-email-binoy.jayan@linaro.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1464843475-4870-1-git-send-email-binoy.jayan@linaro.org> References: <1464843475-4870-1-git-send-email-binoy.jayan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The semaphore 'rf_sem' in rtl8192u is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8192u: Replace semaphore scan_sem with mutex drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 2780838..7b921d4 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -880,7 +880,7 @@ typedef struct r8192_priv { short crcmon; struct mutex wx_mutex; - struct semaphore rf_sem; /* Used to lock rf write operation */ + struct mutex rf_mutex; /* Used to lock rf write operation */ u8 rf_type; /* 0: 1T2R, 1: 2T4R */ RT_RF_TYPE_819xU rf_chip; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index c6d3119..46d613a 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2374,7 +2374,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv) spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->irq_lock); mutex_init(&priv->wx_mutex); - sema_init(&priv->rf_sem, 1); + mutex_init(&priv->rf_mutex); mutex_init(&priv->mutex); }