Message ID | 20180615101506.8012-6-peda@axentia.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 D814E600F4 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 10:18:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBBA028D2D for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 10:18:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD02828D67; Fri, 15 Jun 2018 10:18:02 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 442FC28D33 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 10:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S6nCZ7WPcNf+K6er8L99fGdcjmZ31bJlK9efBgLEIKI=; b=BumROq1YkJ/WbN 3HcAGsh7jM0U2cqt3z+pviCyuntpyLsf7G6GB57LoO1ncW0wJuFSHcbLldQ1jC6Jdypo25OBMV2UN BXPyFp2MH/ptY2hqZTbeeCebbZh263cO0tKfJ0qeFeqfkgGWauzyFQGzwb5ChW8bKess09I1N8zxe f5YM+KCtPNMSRW0VzYl+G9MeDosfG57VHHb5UxqtCQs4Jba/87eJuLFOPlX1DDBy2VSDg0X+e6w5z GakeRWs22eoaY3niFHDL964IrQuFQbAB2T24gPpJoRJHic9eYw61NwnvbWE1CyTDaYyEA1t5+9jNr HKbY2Y/695EeP9nvdwQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTlng-000894-B6; Fri, 15 Jun 2018 10:17:48 +0000 Received: from mail-he1eur01on0138.outbound.protection.outlook.com ([104.47.0.138] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTlm4-00078p-AT for linux-arm-kernel@lists.infradead.org; Fri, 15 Jun 2018 10:16:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cGU8WFBhUhsff8FOX5vttUSdBg83EEXhQBgkmD4dy50=; b=TiR/avjp2tR7x7DwJjk/0V54tAhkqTAxott9pT4syzJD7ZYX3jJHEi5USke5WvUKhyCbw1sCLr3MVFiQXRh7BVasqnIfStZqDxNJQQSRrLtg8LuLMXBME0TcuOkF3HUrUG59ZK8ZqxMdJKK9p46gwY3eC1bHBq/vwxlL4oEa4SQ= Received: from orc.pedanet (85.226.244.23) by HE1PR0201MB2460.eurprd02.prod.outlook.com (2603:10a6:3:82::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Fri, 15 Jun 2018 10:15:50 +0000 From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Subject: [PATCH 05/11] media: af9013: switch to i2c_lock_segment Date: Fri, 15 Jun 2018 12:15:00 +0200 Message-Id: <20180615101506.8012-6-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180615101506.8012-1-peda@axentia.se> References: <20180615101506.8012-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR05CA0248.eurprd05.prod.outlook.com (2603:10a6:3:fb::24) To HE1PR0201MB2460.eurprd02.prod.outlook.com (2603:10a6:3:82::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99ac3f9c-f48c-4b50-ad54-08d5d2a8f895 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:HE1PR0201MB2460; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0201MB2460; 3:3qMtuMxjZfdupnPSMBf8e0NFPRda/52XBAfYCx3Pg08RETTrScbnjuXNIRLv09k0Oj8Hpw9eDgfX3hTz5zqRKihD1/rss4SGrbKZWEhNfXxpQNnG0Hy9uPcaTpNAWLitOHq3669T9jtXDlxNBKGQEkMYYFEYsJDLOw1AKYw1hlxe6PkM+/hZ0UiWefTUw1x4O9bxCkAg8FBln5BqUOPBmpKn1Y1sInq+alfWZRpsqWnScJO1c30qkVFLM/4cgwgY; 25:gr2UTwNUG3dxrB7ZS198zsK5Plap/A0/IoBhcX943og1kqvBGG0IruyrN15+WjufIv4wReMLvZVLaG+1UPTkFHAuypkfEzpOlgSnhOui9Cj1Lr+bXt358xuHmUa2dYQjx79geB988IagCI+VkoBIR1chtytYTCpQ7/BJnCdIXyZ8GSyfFGP5CmKv6S5QwhRMiZJ/NhcDE05uFqdEY7F8+XWEJX6rXex2YloIeYKeA8BDHOT8gBJpkqV0WV6SJjWaDYRVroewAlHWdHtm5V5abXtLyvCWhlk4Q49ZT+fONi8vvACvcHWgWwlxzqrW+cEZpyhaYloN2W3wI35B5GxWVw==; 31:aEN0WhhCXdmAtTlCDPOhbevyXt7nUBNDCcYaVKkMvBGH046RlFwweCbFms2dfJBaKXQIVAfFXOaZ3RgDTVfTebWQdpFS4QN+YGAOVgGk038VCgkaXJXIsxwRrZaZ1H+8YW6V2p83QEQ9oAh0pVEzdbZnS7grdQkyjvEj4gj4xoRUCHNkAaGae1Zpb16lhq6bK9LiUhDd4Atvqrx5kJAp1JV8Gn33gEbepz1SGPOgllE= X-MS-TrafficTypeDiagnostic: HE1PR0201MB2460: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; X-Microsoft-Antispam-PRVS: <HE1PR0201MB2460126098554CE908620FE1BC7C0@HE1PR0201MB2460.eurprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(2016111802025)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(6072148)(6043046)(201708071742011)(7699016); SRVR:HE1PR0201MB2460; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0201MB2460; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0201MB2460; 4:5KtftxqGeBhkZUjYnSiQGSpKvP/suZ6/g3YZPJlXWRzKNs5I6tNnwpd0g5EXzPusE7oNaMEgrXO+D0p/MV9Ch/5bkcDOV0vnISGtxS8hy/UVNu3Ei2vK1Iluyy7ge/eMB0IMDZHD3PcvI8gOz/7S3jbHLECW+8CHOR3JAnTG1ifR5ZC8czbMEDrIJq4zik5inJAtCCCuhLlFmFrO27hybj/PkC8Qd3SpJSwfHRhS3Zp0caiT5b8JYbgwXP4h2lgTlVz4B246tFatrFtC50Rlhg== X-Forefront-PRVS: 0704670F76 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(1496009)(366004)(346002)(376002)(396003)(39840400004)(39380400002)(199004)(189003)(186003)(16526019)(97736004)(50466002)(386003)(50226002)(68736007)(81166006)(8676002)(74482002)(26005)(52116002)(6666003)(478600001)(51416003)(2351001)(81156014)(59450400001)(8936002)(6506007)(2906002)(76176011)(15760500003)(6116002)(3846002)(1076002)(6916009)(48376002)(86362001)(7416002)(7406005)(106356001)(66066001)(2361001)(8666007)(305945005)(4326008)(39060400002)(53936002)(36756003)(316002)(5660300001)(446003)(476003)(7736002)(105586002)(6486002)(6512007)(11346002)(54906003)(956004)(47776003)(25786009)(2616005)(486006)(16586007)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0201MB2460; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0201MB2460; 23:rHaBjBbp7Sw5gyv9AM78NQTOWmWi7jWNrmTXwXs?= =?us-ascii?Q?JMMS24otRyrac/GfyJdkmWBgZnp27QCAqsvo9hHKIVKixK602wmN4qTXrzoX?= =?us-ascii?Q?tw+hT74Jig8tcwTPUOBYaysGA2xH/i1pHpp1PfxY5lZNyFpLX5KBEIa7NQS6?= =?us-ascii?Q?htQT595owO4QiA95x9QL14BXSL/shr9F9USBkAKOhmLNBHlYznCVb1poyPUS?= =?us-ascii?Q?/Boc6d4MxczSbbT+fW38VWjvvN/h34pW14gh+snHqjp4UDh88q67197NEFJc?= =?us-ascii?Q?E3y5QEIV4lW8tSgizJEpwSpwAu1g8EX2Nh+L2rTLA0bGapdbxqZfNyVFavHK?= =?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jjk93O2lgRvOVWxnHAQIJOBSaoa0?= =?us-ascii?Q?3hf5mztJCs1wuv+RQj96/+kq6s2luNfGUG/uVvsGZEK7lHNVHttj3nn/uo53?= =?us-ascii?Q?G7yiPlwYGVF7cwE8touWt2TkKKKMi7rsdTYZ+K1QWRV54faalQzKp3JKoggL?= =?us-ascii?Q?y6rIwq0nAbXCsvY1uh5iX4omDXv2DmswbDGsCrWwV9LiHo3cciQ15eP9PlZP?= =?us-ascii?Q?3ByrGrffty3jVAjdCGrEEzM6LC/g7u4VVSO8BpC75lPaRvLI5xgYm?= X-Microsoft-Antispam-Message-Info: ++JoVKrK0ArCTL8kT78nj/SuTyo1zBYcXqZOK9zu+BCQSvdH2eNMv/bhYxzQrmWqywS+mheasW2zff4RrGQOI2Zqu7GGwc6frl7RdYaTsT2cHlQyaeOV/UDvzRdvCDM35fldI99h/VaajSXcyQhMfDTqMqSfOXs/EjM1BkMmzVISwyszNf0z2CNX39eDs1Y/ X-Microsoft-Exchange-Diagnostics: 1; HE1PR0201MB2460; 6:LRrkaJBFmPeKPt+O7pbL8XFami3hIm/UkjmKwJrd7zDM3RDW3Oxy2p90fLRxJVLHeQotQsvcjr0KaZHE7WY6YSfBiPUN5OKiCKTGybV6m5jM+5vKXXuaMRjaxEUZgheSbQNsicz2OFldEy1X+lINwBMODagphSxhG63El7G1ictHc4Uuvj8zcRzwBg1CJpwoOijc3pr8FDmDv7cRmNfvLb7LkM61u31FpBagz8Jkfk4oeeza4p+dwapYZfqyKcVAaxVGfapzP9A6Z8C8po3pELbUa77NQiyprbiBHvdSyQN3Lje1F/hYfsfXZSArhZdvHfloUagw9xYEbuUQ+qr3GoaUzul+oksHe2giNB6s9fd/cJ7gyUEwnCmckVF/RiLEnNKcTYyHsMUoohpzwTmCIeLLgH1aq54+MzUAnKiDIDLNxgMg3sN5K1BDNEFPTKJsrDhy8CV/JGMhLjmw4xMyRw==; 5:/ItC/L4GmTIA0eKWjQ498XMUiWRzvK2TyYp24J55/mqlyFuWvOvEvDsWvvAVmwadjvyyb4URUdpskzfJfpYLkrahXagMDhpAy3vPTi22unJVmYA9N4trJoZybZGISkqLS8BHmyEJujAzHW3FtXjbya5oIhCQQd66B2Oe617Za7o=; 24:Up7mYSd6dXcBN7m0aZkFCyI0AT9/TBfR5FnlvHr5OneXSYECWH2hufH05gmhZxeDbZXlewKWj07nHOu0aOoEYj6nK8wIcoM1IDQJi1D9WRU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0201MB2460; 7:eV7shTdiKOLdSwxbrVPrDtCswkHwgTh7ZjSmBIIxs+qGCncO9SVYYQ8NJnQDlvfbIQFFPbXYAVgwlKkkIfrLMjLHPSmRs8f9aw9iQJNyg1UX1nmBwNmrmrwsxyoG4qCYPnHk6WoD98oY9aHL8RRHHm6mBsH0VqV2jF+lx4neEGdx56LDg0o/tpZFSEBgoBjdSJwzweAU8Ojwc0qnwwNcXSqza+Au6gPToCUgSnOZLouotypVq7LZb2ovC1rlb9Mv X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2018 10:15:50.0003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99ac3f9c-f48c-4b50-ad54-08d5d2a8f895 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0201MB2460 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180615_031608_391781_0700AEA6 X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Crt Mori <cmo@melexis.com>, Wolfram Sang <wsa@the-dreams.de>, linux-iio@vger.kernel.org, Sekhar Nori <nsekhar@ti.com>, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>, Thierry Reding <thierry.reding@gmail.com>, linux-i2c@vger.kernel.org, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, Peter Huewe <peterhuewe@gmx.de>, Michael Krufky <mkrufky@linuxtv.org>, Lee Jones <lee.jones@linaro.org>, Antti Palosaari <crope@iki.fi>, linux-samsung-soc@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>, Kevin Hilman <khilman@kernel.org>, Chunyan Zhang <zhang.lyra@gmail.com>, Krzysztof Kozlowski <krzk@kernel.org>, Jonathan Hunter <jonathanh@nvidia.com>, Jason Gunthorpe <jgg@ziepe.ca>, Kukjin Kim <kgene@kernel.org>, bcm-kernel-feedback-list@broadcom.com, linux-input@vger.kernel.org, Orson Zhai <orsonzhai@gmail.com>, Guenter Roeck <linux@roeck-us.net>, Haavard Skinnemoen <hskinnemoen@gmail.com>, Arnd Bergmann <arnd@arndb.de>, linux-media@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>, Gregory Fong <gregory.0xf0@gmail.com>, linux-tegra@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-arm-kernel@lists.infradead.org, Baolin Wang <baolin.wang@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Laxman Dewangan <ldewangan@nvidia.com>, Hartmut Knaack <knaack.h@gmx.de>, linux-integrity@vger.kernel.org, Brian Norris <computersforpeace@gmail.com>, Peter Rosin <peda@axentia.se>, Jonathan Cameron <jic23@kernel.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index 482bce49819a..a504697ff557 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -1312,10 +1312,10 @@ static int af9013_wregs(struct i2c_client *client, u8 cmd, u16 reg, memcpy(&buf[3], val, len); if (lock) - i2c_lock_adapter(client->adapter); + i2c_lock_segment(client->adapter); ret = __i2c_transfer(client->adapter, msg, 1); if (lock) - i2c_unlock_adapter(client->adapter); + i2c_unlock_segment(client->adapter); if (ret < 0) { goto err; } else if (ret != 1) { @@ -1353,10 +1353,10 @@ static int af9013_rregs(struct i2c_client *client, u8 cmd, u16 reg, buf[2] = cmd; if (lock) - i2c_lock_adapter(client->adapter); + i2c_lock_segment(client->adapter); ret = __i2c_transfer(client->adapter, msg, 2); if (lock) - i2c_unlock_adapter(client->adapter); + i2c_unlock_segment(client->adapter); if (ret < 0) { goto err; } else if (ret != 2) {
Locking the root adapter for __i2c_transfer will deadlock if the device sits behind a mux-locked I2C mux. Switch to the finer-grained i2c_lock_segment. If the device does not sit behind a mux-locked mux, the two locking variants are equivalent. Signed-off-by: Peter Rosin <peda@axentia.se> --- drivers/media/dvb-frontends/af9013.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)