From patchwork Mon Feb 5 19:38:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreeya Patel X-Patchwork-Id: 10201615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C88EC602CA for ; Mon, 5 Feb 2018 19:38:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9735205FC for ; Mon, 5 Feb 2018 19:38:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD87E287DA; Mon, 5 Feb 2018 19:38:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55295205FC for ; Mon, 5 Feb 2018 19:38:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751575AbeBETiy (ORCPT ); Mon, 5 Feb 2018 14:38:54 -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-Google-Smtp-Source: AH8x226g61AHGVLJAxmif+3ZkBtFgt1b5cVtAagYA59k0Nj1gvzWJ1PB92zHZ0Fvn4EHASVzKzja7g== 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-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;