From patchwork Mon Jan 29 14:49:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreeya Patel X-Patchwork-Id: 10189827 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 3369760388 for ; Mon, 29 Jan 2018 14:49:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22148284D4 for ; Mon, 29 Jan 2018 14:49:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1333A2863E; Mon, 29 Jan 2018 14:49:36 +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 6D24328630 for ; Mon, 29 Jan 2018 14:49:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751387AbeA2Ote (ORCPT ); Mon, 29 Jan 2018 09:49:34 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36491 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751337AbeA2Otd (ORCPT ); Mon, 29 Jan 2018 09:49:33 -0500 Received: by mail-pg0-f67.google.com with SMTP id k68so4639540pga.3; Mon, 29 Jan 2018 06:49:33 -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; bh=8TzH5zR+eUblWPsqFUYQzTKwMK/OFQIz5j9i7KouMlg=; b=MmTdohnlE1r1iKhXg0QfNs7C+FLq84LJyAK+dqxaL9iD4+R1YTUyUKaRP09F87XVR/ YPZmod2dpgCfEkhx8Vrv14RWzV/X7dTPpPmATRuXIdcKXCrwRtFCjQJpkq8x9qIAYEE/ 1bACZ1UGcSOfGB5xq07ZJYauZAxDTcSIk9DTcyCk76KBlZGt30KkftIfc95h3yCrXOeZ 9pAAwwzlgAuM5RE8XiqfGOfemMn7waRD1WxXzCHiJnPOdjw0pXxJo6F2LoDCGvkDLGnM hBn14LtED4tFhGNjS4ODtAxLLvBMUZ5zWWAHSDIvHf0z/jb1jlfZqlzfEqyGaq9njV9f NYeA== 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; bh=8TzH5zR+eUblWPsqFUYQzTKwMK/OFQIz5j9i7KouMlg=; b=lixLj0dAoqHvulVEedT7u4Epx4RBwHNM4c0aCwiR0EAk00Er949H5abIqJSVc+XSU9 mTVkonqUErOFahB3+uTb0Q2PBAUVn7XoE8Kc+5MZ3/PVUD7O1iVgHpdQPzCP2p3pgPd1 xc3WjfHxOO1gMzQd7hzjBGFaoeEjCp2N4oD0vor0ionqWD4OuWB2F/+NUqDZJlrA4wYt zBBCwppCJw5hM2NlzVcKY6qaw1KtSXa8+IC8Z9kzAAyO7IuBQFVHfaddnb/VtxMFWJzJ oZD5QdaDFSEqvNYL8gYUREWblu9F8jhXjTzY9cai+rD04X7lmQIx1Q63ZVumJ1uDy5p3 Kmhw== X-Gm-Message-State: AKwxytc+3qz5+IHwtueEOPqdR0NhbtUShyfmJqqITdgV0EanAwhlqa1p gT/nxwvCeJf1l+U/T8SZ8jM= X-Google-Smtp-Source: AH8x224HHreomOGYIz/g7Dmi3gV3FQyNNSTUt0mmlJ3U2OFOn0bQRhfUDgylhalQIKN2VDUWqX/rPA== X-Received: by 10.98.61.22 with SMTP id k22mr26968496pfa.133.1517237373169; Mon, 29 Jan 2018 06:49:33 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.157]) by smtp.gmail.com with ESMTPSA id u21sm30162094pfl.114.2018.01.29.06.49.31 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jan 2018 06:49:32 -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] Staging: iio: ade7758: Remove iio_dev mlock Date: Mon, 29 Jan 2018 20:19:26 +0530 Message-Id: <1517237366-4818-1-git-send-email-shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.7.4 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 ade7758_spi_read_reg_8() 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;