From patchwork Wed Jun 15 05:40:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binoy Jayan X-Patchwork-Id: 70082 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2395638qgf; Tue, 14 Jun 2016 22:40:19 -0700 (PDT) X-Received: by 10.36.233.3 with SMTP id f3mr14273966ith.19.1465969219017; Tue, 14 Jun 2016 22:40:19 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si32956405pft.184.2016.06.14.22.40.18; Tue, 14 Jun 2016 22:40:18 -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 S1752087AbcFOFkQ (ORCPT + 30 others); Wed, 15 Jun 2016 01:40:16 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33224 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbcFOFkO (ORCPT ); Wed, 15 Jun 2016 01:40:14 -0400 Received: by mail-pa0-f41.google.com with SMTP id b13so4031818pat.0 for ; Tue, 14 Jun 2016 22:40:14 -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=TQ0AkhWvCE3ZQVJ7Mj5s2Ldv0BDyZ8wutoszY02GjoA=; b=hM9bXzoQh2lmb2xmj5wKYjHPslWudVjcMTvgSc9X0ObP7yKMaIz7BvPZpwfvVXk++9 IacTb12ACShxzIsQT2X36br1Ao7Y7Il2tR/G6u9UBPBSqf5uYi/jq3XHRO41y9/sqfqV ul/4b6Qi3HEwIBKL3Mc9NU1zT/jPZUXHGeHJo= 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=TQ0AkhWvCE3ZQVJ7Mj5s2Ldv0BDyZ8wutoszY02GjoA=; b=GAlT5xTZDmWo9BLolaT04gvEHgX54L6f8lpC+rOIKMkVjWeqR2YRC31xYNatIQv0se YYqVNxZpdOYOZfCxny7dYT+uHpmHOq8M38aedhsTHJiUv9B2Y8eRRrIPtsmSVaT9rqoA 3QTh72zUClnA3IqVFIwaJOSk2hKsFFjJsPbJRGnKBhuqNJEOz6jn9kSDG3VvKXB4AGep xQOyrYDmpUByZUnXvYsCD5vWmBeVXc0EIEVa91MsJ4e/k05qryw+Gt4++M2ytu2k0PnD 0yOgzc6NwbcFiulLHgGezUO483Hb8Q9SzzsUjMZfqEuBpGadHtyA4ugCZXxw0K4DcAz5 GDQQ== X-Gm-Message-State: ALyK8tIRaBhumOlvTINWvPw9vhgN54pKq85HdM5yy7xzo1dKdAWd3pPMCKj20PNz7ifUPGyl X-Received: by 10.66.47.133 with SMTP id d5mr1875852pan.48.1465969213524; Tue, 14 Jun 2016 22:40:13 -0700 (PDT) Received: from blr-ubuntu-59.ap.qualcomm.com ([202.46.23.61]) by smtp.gmail.com with ESMTPSA id vy8sm49394292pab.22.2016.06.14.22.40.11 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Jun 2016 22:40:13 -0700 (PDT) From: Binoy Jayan To: Greg Kroah-Hartman Cc: Arnd Bergmann , driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, Binoy Jayan Subject: [PATCH v2] staging: gdm724x: Replace semaphore netlink with mutex Date: Wed, 15 Jun 2016 11:10:03 +0530 Message-Id: <1465969203-21348-1-git-send-email-binoy.jayan@linaro.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1465828160-17141-1-git-send-email-binoy.jayan@linaro.org> References: <1465828160-17141-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 Replace semaphore netlink_mutex with mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/gdm724x/netlink_k.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project diff --git a/drivers/staging/gdm724x/netlink_k.c b/drivers/staging/gdm724x/netlink_k.c index a0232e8..abe2425 100644 --- a/drivers/staging/gdm724x/netlink_k.c +++ b/drivers/staging/gdm724x/netlink_k.c @@ -14,6 +14,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include +#include #include #include #include @@ -21,13 +22,7 @@ #include "netlink_k.h" -#if defined(DEFINE_MUTEX) static DEFINE_MUTEX(netlink_mutex); -#else -static struct semaphore netlink_mutex; -#define mutex_lock(x) down(x) -#define mutex_unlock(x) up(x) -#endif #define ND_MAX_GROUP 30 #define ND_IFINDEX_LEN sizeof(int) @@ -96,10 +91,6 @@ struct sock *netlink_init(int unit, .input = netlink_rcv, }; -#if !defined(DEFINE_MUTEX) - init_MUTEX(&netlink_mutex); -#endif - sock = netlink_kernel_create(&init_net, unit, &cfg); if (sock)