Received: by 10.223.176.5 with SMTP id f5csp2889069wra; Mon, 5 Feb 2018 11:39:42 -0800 (PST) X-Google-Smtp-Source: AH8x227URvxadsWZXzOw8bKjmy6Z5XElhgq3bD77FrbYcSM2Nao5bPnGcYoRFgXQ146MZJw4InHc X-Received: by 2002:a17:902:5914:: with SMTP id o20-v6mr36576705pli.196.1517859582131; Mon, 05 Feb 2018 11:39:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517859582; cv=none; d=google.com; s=arc-20160816; b=qkhpqs7U7EYxTBgwqMR2lW8a6ZUrlx9Q/5J5ujHzjN5XBHQovyhNAj9fVEewKlmqzF cHIFzOVHRwirMA3f6EXyTjV3nWTxugwX+Ee9E6ZGns5SpmlDB2XB9rL3JfpxGGvGRYwi FA7hloZjCRsRcmY+9jk+/1O6iyU5qpkuR0PJU+zHOZmYhFiplxzv2u3BqW0/dE4RcIVW ZNsjBm9VQ4RW32ItQsaZRamhwyfBz2mi2oHrZggseTkjBFmptVUsnfTt2qcaBDsdw+U3 t5PODAQkgiZKO1fV5FbAAvjBCpN3YRezSMX0301uuy6cVsBUP0qLEYc0myrjVn7HVx/+ dF3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=H5QlK2/3Guia/Ok4NKFsmEjbbVbMRbR9jict3IAqqzA=; b=FCA4g9Ya/4Zp5AMpXRzJNPEQM/4mD+C6ZUtQXJuuLOg+SeR8YO0s7544OJ7ClTwzdY kKL98kLBN2YkMuum/7YEZ3LxRI03ZEqPa3xgERh2VBXCkPObjuWJMJICgxjehTl3hAiG Ll7AHuplquejoX894a1GZfS8b35NEcBORxBny9WVq4khqYtI7l+57khFc7dgPp2YWuV9 dSQSRBz2GPgDo7C/ev4jUJfw4ICDBDpdvyWzZNm62EAtMU+SFzGPEXqJE7laDK9xYBM3 RY/8Kx1h/poxhKt2mENA5Wpacp9eqdOjLBC+lmGCHBZCVsYNziNznFJ1Q9BbrSAvsI7O JSjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l/MRFEIS; 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 sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si6709383pfl.34.2018.02.05.11.39.27; Mon, 05 Feb 2018 11:39:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=l/MRFEIS; 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 sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751778AbeBETi7 (ORCPT + 99 others); Mon, 5 Feb 2018 14:38:59 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:37520 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBETiy (ORCPT ); Mon, 5 Feb 2018 14:38:54 -0500 Received: by mail-pg0-f65.google.com with SMTP id o1so5229404pgn.4; Mon, 05 Feb 2018 11:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H5QlK2/3Guia/Ok4NKFsmEjbbVbMRbR9jict3IAqqzA=; b=l/MRFEISJLDKU0oe2wAXEof6wn5keIExrvtJZY1/Nj4JASj4Jrs9JPeODM0EJY01nD lCM5RrWX9VuUDGMTSHMTulGgxYXydiBq2F8BxnAnqk9TEeJ2ZgN9W6edu6q/n2VJN/wv fUOzxG8UjEhPG7xcjmjvd67BuKlGBu5cOUnszsGbTL2QAyczJxTnWEgBjMiNqdc0izO2 8d6KlaNHdE3JlGIK//9++eXzt0CbQZnHE3dqvFjhYboWkaJCVsYn90ADandA1y8Pa/HU 6Yw16YcYwV/oiwAwaqoLZVl4bqet2cBhxxXzydyJUKHCUIn+YPFsDkkjKiiK+pBDWJdh qUWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H5QlK2/3Guia/Ok4NKFsmEjbbVbMRbR9jict3IAqqzA=; b=YcSY/33Ya+goTlhppVGVIOPmQ+3ZsM5K7tyibWHPUYp6ExpQzduwOCtsjpFAmG9MrK vDIqmP+REyJODleGwc699SroloVz6rgfPtvPJdedNyXowy937aaLdD5uZMNM2ZbMeT6u Lt0zHUnzhFaTib7rX4baQZll+g/k5C6Rcvc6UqCYR400jTBrWUblnxAgtMRrNGIyM+0k EP0P2fB7QbdNVhUgHfbHKIKj9MYRS8U8X0eWzm5/ZBYnTEYPAbD07virPNSmPB8rtRk9 WqPusX2qMALlvTqFebC8W1djWMAGQpe3A91TsWWxwEHOe2i3uR/34aAzhVKkVx0gHzc4 dRFg== X-Gm-Message-State: AKwxytd/j+HZXtKZIfOZjrisEQ1Hq4l5GTjNAXHVrjS+zHPjJVA5rFVu cPf9eQrsl1FcnVupoOakpbg= X-Received: by 10.98.71.146 with SMTP id p18mr11883357pfi.3.1517859533498; Mon, 05 Feb 2018 11:38:53 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.133]) by smtp.gmail.com with ESMTPSA id j83sm13939550pfe.47.2018.02.05.11.38.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Feb 2018 11:38:52 -0800 (PST) From: Shreeya Patel To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Shreeya Patel Subject: [PATCH 1/2] Staging: iio: ade7758: Remove iio_dev mlock Date: Tue, 6 Feb 2018 01:08:47 +0530 Message-Id: <88eba335f73f931acb1e5d1be63992f8ae0fdc5b.1517845616.git.shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the ade7758 file, read raw does not require iio_dev->mlock for reads. It can run concurrently as resource protection is handled by buf_lock in read register. Signed-off-by: Shreeya Patel --- drivers/staging/iio/meter/ade7758_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c index 7b7ffe5..227dbfc 100644 --- a/drivers/staging/iio/meter/ade7758_core.c +++ b/drivers/staging/iio/meter/ade7758_core.c @@ -526,9 +526,7 @@ static int ade7758_read_raw(struct iio_dev *indio_dev, switch (mask) { case IIO_CHAN_INFO_SAMP_FREQ: - mutex_lock(&indio_dev->mlock); ret = ade7758_read_samp_freq(&indio_dev->dev, val); - mutex_unlock(&indio_dev->mlock); return ret; default: return -EINVAL; -- 2.7.4