From patchwork Wed Jun 15 05:30:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binoy Jayan X-Patchwork-Id: 70081 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2393084qgf; Tue, 14 Jun 2016 22:31:38 -0700 (PDT) X-Received: by 10.107.10.35 with SMTP id u35mr36853938ioi.92.1465968698158; Tue, 14 Jun 2016 22:31:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si25662077pfi.182.2016.06.14.22.31.37; Tue, 14 Jun 2016 22:31:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926AbcFOFbP (ORCPT + 1 other); Wed, 15 Jun 2016 01:31:15 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:36623 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbcFOFbN (ORCPT ); Wed, 15 Jun 2016 01:31:13 -0400 Received: by mail-pa0-f45.google.com with SMTP id b5so3922621pas.3 for ; Tue, 14 Jun 2016 22:31:13 -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=4bngoHov1ZcMRRMrEfSPZkjumP8fbmkCjBrufsshSRU=; b=TUwdSZBiilbCgDfaftctq9eoWVQKFgYXcbdeVUanIzQE4Rz93T2UC3eVEP2+5l6Lu2 xAIhteU/3TY6R/PvT51K8nsZXHo54JLvmmnNNit5XZV5FY54tde3t4ugB2jbl8aqpDJ4 c3399PbAk/qm+QW6UlaTc2m+xGt6rLTM/ieWg= 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=4bngoHov1ZcMRRMrEfSPZkjumP8fbmkCjBrufsshSRU=; b=P/x/dUIB/KhmyDnCickxAQm8fQ64Az8jP4qQAfREJVpo0l+5NiWjgrJdOX2/Ho2wFd TM3BCSZ+cUZLqvEGWD7jrKCG+I88zPp6+7yDuP+DGtOh1UhjhwwlyalETWMQfGj3Acuf 0rJ7wN3rf555csEJHj5oQ7rHMj3nG6uIMPiUX7HhfBx69tfOcuujwyqaFS1ORXuc/iuB Y02C1iVMCH6c0g32tJeBGL9tr8Da93V0SMElEGJk2Lo52WgpswWFTSOblXrA1YO+vmv+ +7Bae078CSlPwXxvnVdgfjsECbZRIytuu3F6n4jIiOZWgKl7F6vWxth7eiihKWEKD5ki zqcg== X-Gm-Message-State: ALyK8tJzrh0V2y+vF9N1ZnDLOb0NMfjvhY6qf9hRGJVqYLyXhrsviSYWqivdvU5Ys9duKUvJ X-Received: by 10.67.7.199 with SMTP id de7mr1841466pad.94.1465968672931; Tue, 14 Jun 2016 22:31:12 -0700 (PDT) Received: from blr-ubuntu-59.ap.qualcomm.com ([202.46.23.61]) by smtp.gmail.com with ESMTPSA id 81sm28286566pfo.74.2016.06.14.22.31.08 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Jun 2016 22:31:12 -0700 (PDT) From: Binoy Jayan To: Greg Kroah-Hartman Cc: Johnny Kim , Austin Shin , Chris Park , Tony Cho , Glen Lee , Leo Kim , Arnd Bergmann , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Binoy Jayan Subject: [PATCH v3 5/5] staging: wilc1000: Remove semaphore close_exit_sync Date: Wed, 15 Jun 2016 11:00:38 +0530 Message-Id: <1465968638-22129-6-git-send-email-binoy.jayan@linaro.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1465968638-22129-1-git-send-email-binoy.jayan@linaro.org> References: <1465814259-3009-1-git-send-email-binoy.jayan@linaro.org> <1465968638-22129-1-git-send-email-binoy.jayan@linaro.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The semaphore 'close_exit_sync' does not serve any purpose other than delaying the deregistration of the device which it is trying to protect from shared access. 'up' is called only when a subdevice is closed and not when it is opened. So, the semaphore count only goes up when the device is used. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 7 ------- 1 file changed, 7 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 39fe350..f87a30f 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -31,8 +31,6 @@ static struct notifier_block g_dev_notifier = { .notifier_call = dev_state_ev_handler }; -static struct semaphore close_exit_sync; - static int wlan_deinit_locks(struct net_device *dev); static void wlan_deinitialize_threads(struct net_device *dev); @@ -1088,7 +1086,6 @@ int wilc_mac_close(struct net_device *ndev) WILC_WFI_deinit_mon_interface(); } - up(&close_exit_sync); vif->mac_opened = 0; return 0; @@ -1232,8 +1229,6 @@ void wilc_netdev_cleanup(struct wilc *wilc) } if (wilc && (wilc->vif[0]->ndev || wilc->vif[1]->ndev)) { - wilc_lock_timeout(wilc, &close_exit_sync, 5 * 1000); - for (i = 0; i < NUM_CONCURRENT_IFC; i++) if (wilc->vif[i]->ndev) if (vif[i]->mac_opened) @@ -1258,8 +1253,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type, struct net_device *ndev; struct wilc *wl; - sema_init(&close_exit_sync, 0); - wl = kzalloc(sizeof(*wl), GFP_KERNEL); if (!wl) return -ENOMEM;