Message ID | 20180615101506.8012-4-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 CFFC1600F4 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 10:19:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CF7E28BDB for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 10:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8122528BE9; Fri, 15 Jun 2018 10:19:00 +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 22A7F28BDB for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Jun 2018 10:18:55 +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=ZlhztW+xvhhIvI+EwiwBgoom0nRC4JwPVrn43rsoZKU=; b=l96fu5k2px2tNz 7jJWkJqhMaCDmN/7/ZE1cgf+/ijWKc/rgqLQHafpf7OgM2YjpeLpLbpF3I06r6B1nDE0zZhJfhYxZ AHNM/BZu8Cpdm2FB0WzNUKzKwoO8+Octn2pcBu8a/dRADUc1z84xRAgZes+YZUM/fK+Fg7nW++BTB pRBKG559EZJ4BfiOmwOZIJwzb5QzNUn2aT7293OdnO0SzDb7Se0QgEd4nH9F2RTfOabS9PqZNuEpN NcdPpp1da4i4CbLOUcEq05GP4niXVSBpWoH5yBMHlDraRKaK2fs5YAEumJpdycHAad9s2vIDkqYJe xmTsDOo2S/vPIrKvQpwQ==; 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 1fTlof-0000Bf-6j; Fri, 15 Jun 2018 10:18:49 +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 1fTllu-00078p-Rt for linux-arm-kernel@lists.infradead.org; Fri, 15 Jun 2018 10:16:07 +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=90keiCHp3IDfvV63uqmCdLfF94S0mbMt3HURU0OhIrs=; b=u5GoSfb44MNtQriNCyxnaRR6Yh9uOcaGxWRchvQ5NLjK/1Oej3y7hGAqjaHbsI7EH5BykZgfiI+MGxpHASwrnFfY3MlKUzv6lI6yAW7UeqCrYC/pfrznHPtbRQbwcVRyZAEL7IQGa97tzdMRDXiymq8ckMqNTLTC2ZQb22bAVbE= 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:43 +0000 From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Subject: [PATCH 03/11] i2c: mux: pca9541: switch to i2c_lock_segment Date: Fri, 15 Jun 2018 12:14:58 +0200 Message-Id: <20180615101506.8012-4-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: 4267fde4-44ab-4eed-7c88-08d5d2a8f475 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:eKYM4/PTuwzBQpcwyWQKDKYFGt8Sjq8+f7MJfPk7V74ISaaRgX03q0cL7rJciTvpSXJ1Jteyj44L7yiIz2f7ksYeppNzn0qskjim+5XTlIBOgf+LmOHtQEOQXIK8r+R+HZCIFi4HLEOfUIrm/R/wM98h5oMnGd6xdMxpGsZ3BHtqGV2/sqfrDxnv0rrYUjOA/NflQ9vK5mqVJK0Zm2whc/fViwOZkYOxMlPOCFqZHl+PLw0yi8FxTXmrC4GrHyWU; 25:zjr95wGtvktLZFtC6b4imW+UYb4ji92oNGc525XhsYGpEK12+Hc7bmOI3QJlWwL+k11dIoZI+/xYeQLRwEMyMFmYSENpZfYL7wlcGmmEr2ax7iiP9TFFHo8LN34SA98U4WeYDZxYiqnrcrlu8ArenNtv7aEztUtXOimkS4SSiKLFnbJNywCTmb5dZWIAeyUN7ZbS7x5oPBCKJKOVlIH0bJpC9xt0AAkHndjXOf5DHsjLWYKpeUh+EM9pJMeLR4UeQMpkhnAXVAnCDIbai19BzdKqh9HI6SUw/ad2nypLC7KVbOKB/wnKspCuKDHa6YKUS+GIJkMYddpB6Y58DEsx0Q==; 31:9VrqSrZ1pI83fgvp2EOkxD1y5iP9Dhlys+9+PiAUnf9GO1DZYA6YE+qyCE8dSPczHDhv6EZF90pyqilRMuMvsC33wDqnY0mn1tc2W11MjhOmOGS63WsNIUzoeB9wmjhsSkwpthLqiGwv0J7Zv0cP6ByuT7d0tI780BFn1DtKSKfW5QSAzw/+pr/HTydQl+mX3Or0FQu6kNUW6yQhnuRY3r7Yy+l6UJQUNNQpvkxFglE= X-MS-TrafficTypeDiagnostic: HE1PR0201MB2460: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; X-Microsoft-Antispam-PRVS: <HE1PR0201MB2460EA1E0A64FFFEFA58E4E6BC7C0@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:IaYtehS/QzPzebgu2PkTop115xY8mdWkQoTwgjAEUxNYbmEhN86nOgb+8Gi/OPR9QjcHuZ02nNPWc8I4S0CiGJY7lkX9xGfM83xqd/yDTPfkCNpJZW86vTiINivhLtR0SKVk2tTzGcdty7HMyWO9YXqMeUf5dZNdHpjRjQJ+zM/AHNNBTeflPnHgOLnlZ4MvlIhPYbWFdJk268RFUVBANUtwPOHF7U01iFq+1HD5gao+2IYRiXqHqmC4V7WDYEa5QsNDYFZsBweKlfEi4GEJ9g== X-Forefront-PRVS: 0704670F76 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(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:d/PcocjkYUm+95xovb/4La5eXz6tfNFbUFWBn8Z?= =?us-ascii?Q?aLGBHPHCW2FCCjBwygx+kFnf3zqXuAps3yw69MhTAYPj+rR9wHSL48Sa2M9l?= =?us-ascii?Q?eomK32bzUWFRau7LDG2kK7xoD1N5DwX0om+ro4EgjKyXwKA6tNy0/z800Q1x?= =?us-ascii?Q?Fmxl3Nr0acTIF68JblbFVOZXC6wIQv7DS1XX1VXu/sYODmT/rTuP5IY3WFm6?= =?us-ascii?Q?OlJg6VqY/jWDSIwSXofHt3MrivbxLXvF11MTo8RW5bSQAHhSGZzdQowIfqKq?= =?us-ascii?Q?aWQAXPBnALKRsIVp+IQa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==; 5:e30EfANgGnNZN2PV8aRQYYJJ3x5KsHhE85kaCT0Kbsv1iZSUU1Abk3uKEEZRmOc2AGwT40PCYcPxuIOviVHRMIP+97TiPNSGMAWpJdqXHs/4bTM24zMvJknZ2wk23oxTiiJ2jMqsDYFQzGfR2ZFpnr+XuEP/as7U95WDT4eZrp4=; 24:LZxYMws2mopxT9vNUYSJ1Slmqqcp43EBW85wgK2mNFElHJ/Fzjker+7uXwJSUPSxuDyH2Go64XDCQ5mQPecdJdBzMYSGjQ/hKsj07Srcx/4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0201MB2460; 7:hHzEL2wxp55gh1825eKAypp3EFX0851PLDmtYav/amAI+OvMDkru6zi4rR2EQJhmIOctcM4IHlGFPfg7RsCsuBSk0g9hnQm080EEEBzzxmIMAW2LKAwqkQA3jF/BHq/j2lE4+hEGpSsBKd9strYLInIj8Q3jO//TB/dxoL/2cTQVadSDVcqMGrViGq4bBytq0zS/uR1PBJZdGguvH5pLwFq19DcCL47QxYqISL5D77rJVz/l/kI8+J5PHn2f+zrb X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2018 10:15:43.0628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4267fde4-44ab-4eed-7c88-08d5d2a8f475 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_031558_943040_60533B7D X-CRM114-Status: GOOD ( 14.89 ) 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/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c index 6a39adaf433f..74c560ed44cc 100644 --- a/drivers/i2c/muxes/i2c-mux-pca9541.c +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c @@ -345,11 +345,11 @@ static int pca9541_probe(struct i2c_client *client, /* * I2C accesses are unprotected here. - * We have to lock the adapter before releasing the bus. + * We have to lock the I2C segment before releasing the bus. */ - i2c_lock_adapter(adap); + i2c_lock_segment(adap); pca9541_release_bus(client); - i2c_unlock_adapter(adap); + i2c_unlock_segment(adap); /* Create mux adapter */
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/i2c/muxes/i2c-mux-pca9541.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)