Received: by 10.223.176.5 with SMTP id f5csp2959740wra; Mon, 29 Jan 2018 06:50:18 -0800 (PST) X-Google-Smtp-Source: AH8x226KBJlYeomAKoMX1S6+wA+QvwIFpRC+U8kZuvqd3thUGPNobbsvmkCq7JsYMMaDaVD6za3g X-Received: by 2002:a17:902:7789:: with SMTP id o9-v6mr2099497pll.84.1517237418003; Mon, 29 Jan 2018 06:50:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517237417; cv=none; d=google.com; s=arc-20160816; b=oqf+3TwOXGFmpNvPZ+Zlxi6G4Z/71x6c/cnbWUZ9i6eA0kLpnRgcpT1wAlliWspVaF JDA7eGBS6f6juerY90SzO6vD3cPkWQkbKdQHQmJkFNwCNjfgyYRUSg1MN++D7TXkmKzt vd3PNxZ9WWHQ0s9TnboEWMWGhbf9V5bbRPFt8pS3q2OKB567EreoeOqrZqacP596MrWr IZjIXcEYhRvvm96y3Ao5oghw3eT6Zx7ZqM/jxO/jUmYWVDfPLXt5hvmw34LnOJOz1/Yk vuS+lYbvUnRqAKyqWaWtMPOdvrhvo0cnvmK84RGVKL2fk43hu63JHuyCLxxt/yIdOGvL WcYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=8TzH5zR+eUblWPsqFUYQzTKwMK/OFQIz5j9i7KouMlg=; b=LcZLv4//fSy9tA2wvGKMcxMQ0uyuqnzxhcESH/p9ih8GIC2H5EomgmkTvvw/jZaY9L lA4XJ6wVAMaF+P1l5tFUPnZMmi3Xjsy88S2NXv4czJpqh+lC1tM2F+zLo6khjLWKwwmo dblQq9V0P9LAprCPfTvwToFAYTNi2QfJjdJCkSje3tU1qao12iQ1PF3/g8r3VUdB/tjL nN6bNvJzYQWg4uJkX3Fsn8YiHmEiXbzk7gyTXhniHeXnJRgpLInvTQ8vfq5lNyy90jIp Pru4gnE+pcGaEz9yY9LzEeLKThUXJlQSJt+3/R2j6E7bYk5i9qIc0QpzUXLqd0lLX1HS vvMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MmTdohnl; 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 3-v6si9433518plt.307.2018.01.29.06.50.02; Mon, 29 Jan 2018 06:50:17 -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=MmTdohnl; 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 S1751847AbeA2Otf (ORCPT + 99 others); Mon, 29 Jan 2018 09:49:35 -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-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-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 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; -- 2.7.4