Message ID | 20180620051803.12206-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 8175A60210 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 20 Jun 2018 05:23:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 676312861C for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 20 Jun 2018 05:23:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B31B28630; Wed, 20 Jun 2018 05:23:47 +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 EC8CE2861C for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 20 Jun 2018 05:23:46 +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=/dE/F80awNUPjTGjcZHDCgg+IdOgnFP0XSy8UidIVHY=; b=EJd/a3Y745vkbo YWvAs4f5XS1jbX+cqG0O5AYxMNgxiEcMzefC2MBgvzwoqwaIzybaj+OdoFOqgz3fAjaIAT1jBN8DK C40zhTYD6viL+gN4wF2jKW7L6l0/xKmYgJdlSK27xWLDF3r6BmA5JvkcrhPk+XdIE2g1KgqSv5v9d q24V22F3l8+gzCQ7sluf5QGVHeg6nsApBsD3lmR0Rt8VQLRsK8fFy7z7eST6XGna5afeW2Q8tZtwd kWVMY7orfj+9OdIFnqiKgnOiPM9EWO7HabJPL0CXl92+PI4Iw+2SYVsT1hwBaopLdfqTS0btvZ8j4 Fe7zeUb1DBo4KfvT1BGw==; 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 1fVVag-0004ZY-Rj; Wed, 20 Jun 2018 05:23:34 +0000 Received: from mail-he1eur01on0130.outbound.protection.outlook.com ([104.47.0.130] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVVWY-0001Iy-Dx for linux-arm-kernel@lists.infradead.org; Wed, 20 Jun 2018 05:20:21 +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=z9JkdxWWsr9G4EkevpbHWFFTJQGKorrkQnVFYlPPGEQ=; b=P39spftQggrX3doZNf5TQ83TypqH0p1/InlK7rBhYEqLGr3ex1RHZGY/azJ7SJebFn++NnZnH5Wz698eu0p/XAqbCgGYiC2Bbg73V2l/k+ROnxrGQIZpH66eTCCTUijXayOX0yrWpR4dAz56xRyXZT5OJ1DDHHtZ7rv4qpj3pRg= Received: from orc.pedanet (85.226.244.23) by AM5PR0201MB2452.eurprd02.prod.outlook.com (2603:10a6:203:35::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.20; Wed, 20 Jun 2018 05:18:37 +0000 From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Subject: [PATCH v2 05/10] media: drxk_hard: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT) Date: Wed, 20 Jun 2018 07:17:58 +0200 Message-Id: <20180620051803.12206-6-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180620051803.12206-1-peda@axentia.se> References: <20180620051803.12206-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR05CA0127.eurprd05.prod.outlook.com (2603:10a6:7:28::14) To AM5PR0201MB2452.eurprd02.prod.outlook.com (2603:10a6:203:35::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 791ce5ea-9171-436a-bc6e-08d5d66d485b 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:AM5PR0201MB2452; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0201MB2452; 3:PdC0lcPM/11Wkz7FLCBZWwpzMinYAmhZVuhNrJ3PyYs+8WoF38bwowM64JP1S40nDbwtpx6upHxzD/CRWgx9AOUtkEMUAr6bOda8Yf026R+EwuCnNYPx8yJqi6H9Wig3SYc7Kp5txXaelmjXWWaJeAToXDQ+6jjrIpE1sJOWisUqZhoqWx9qBW+0/cj3y0SOxJeGB1hYBKdCPXH0Gm8LKuS0RHy+c+vl5uvM1q1s9+k3+5bdmVaB/OUPJKvJih+m; 25:rLsgNMyE94kH3XLKD9VkDDX3rdQk4J7gls6lvaoHasYL6Vre4ESRi0K0NJMRh7DfZ8mK486ZD1BPCZViIJ9UW8EdxjZgt3/iFyZ2n1sJmnsqqUyN6OpQG0u1lHSHw6jWk2eJyFAtvHx6Oj2Uqh7D5gJPhyBpvYYAFAnx1TXAZEMyY9fGrdR57Fb07wAOXLXa197MA3nfhraIxypFcXexgEqmSevk9NaipjQ0r39QSaUyQo3Nc5+5R+GqzyCnZ8wEwAdygBHU7364yt9ZLXjPDvbA8kpSV2rf2o7Qx4R6ku1eUyp2gUqADCoJDPHNM10zRTt0QlHRjh4hXe/ZiOxwfA==; 31:Ysf0RNmu3RFv+YhPebE1JMlscxQ5uzuXf9RrKC0ylItk3uWKYBI85h4JRyGM6PMl/fL3qLiHRIG7EJcDhycVx3YF2mK97V+pBwynDny8OGLmFOu/beCWqYmyPSDQQV0ibvG5WhikmI1loGLiEN2iDWIHq2aH+NJtcsre6DxqMPK2Fig78mUInB8YpnbaTbOVYbkDLKyyALGlymElTi8N8eN6ZMbaykS18Wsu9j5BNHA= X-MS-TrafficTypeDiagnostic: AM5PR0201MB2452: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; X-Microsoft-Antispam-PRVS: <AM5PR0201MB245277002D292278C71C6C94BC770@AM5PR0201MB2452.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)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(2016111802025)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(6043046)(201708071742011)(7699016); SRVR:AM5PR0201MB2452; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0201MB2452; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0201MB2452; 4:zOns7KU4ZYoUZvjS+U6HcFhHrkjDVgbr+8q+rKn76w2OwjjB4FrThlys7ffRunHFuAHTi//qyiogRuxNwPccYFTVbdds719juFVbZK59QyfiGcRiH4BbzOyzTa/unhnxOKvW1mLLooX58JUHWbyhVXpL4hJhem+BdXfxp9rTQKhKx+ZQI271P8JbHKBFtQwxekKu1OUatZpkl+HNBdIUxxuFK+8z+6ib1SbXSlU/ItZjUgu+wW+wb+UQDNMuqbXNdJIarpFX/2MspD0Y6/cIkA== X-Forefront-PRVS: 070912876F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(1496009)(366004)(396003)(39380400002)(346002)(376002)(39840400004)(189003)(199004)(51416003)(50466002)(7416002)(6116002)(186003)(59450400001)(48376002)(3846002)(26005)(6916009)(53936002)(6666003)(1076002)(7406005)(6512007)(76176011)(15760500003)(2906002)(316002)(386003)(36756003)(478600001)(6506007)(68736007)(86362001)(5660300001)(16586007)(50226002)(52116002)(54906003)(16526019)(2361001)(4326008)(2351001)(47776003)(25786009)(39060400002)(66066001)(8666007)(305945005)(486006)(8676002)(7736002)(97736004)(81166006)(956004)(106356001)(476003)(105586002)(81156014)(6486002)(2616005)(8936002)(74482002)(446003)(11346002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0201MB2452; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0201MB2452; 23:iUPnVdCo6cSDyt6JexnzkBsxuo0NsbQj8Pb7+Vn?= =?us-ascii?Q?N1jn9mIr3uC6ks+bsgn7Lsn4DdWm8R6Ijg8LvviCd5IY21K/j2NB+yfa/vWU?= =?us-ascii?Q?hmGmrOyHKbgd7VrbIdV0cVQQw4A5CFev8+Y6RlyfBS/7hinzAFViK6kqPwVe?= =?us-ascii?Q?IyVFMUfVE0f4WlIKrJFYRxuNM1lepVGmZTAkE8uLAcw0kpkx+3tUygbd7Ptz?= =?us-ascii?Q?dCzB1Tzt1hbYlfpmxSAbqMhs6NVBRa0IBM0p56FcaR4KiUB4uBr6yGrcqYHE?= =?us-ascii?Q?qkxwM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CISZdmlkXhFHkdXbJ2NLIc0uYaS+9Z1yMuvRmgd4S/t+HMe7X/CqAU4H1se6i42WWtkOzaEqsbb2YiGfS6bw2IKif/zWYxTRxmLZmHJUUzl7mU6cV8VxiLMQFWFb1TvIJwiL7+Y7aR2g6I/9IM/EXxKX6OT4qCstU+0HYykGOpWz+cfAxYqg==; 5:2uzrNk4RqZUpzXTQL56q6liW1kWzWondmr+ViHeFZ0ap2rm6E2crk3SJfDBAlIjyfBkVrfrn4G3tgVKIhV70rQYMa7G4seHpJGI1vKYgmiRrMuGH/lHM3kt2vLyb8CxJ/VV6CoSCYKQNWwT3+YsfxdVeTagZMr7Lfhd96/+F2FU=; 24:M9a/iIqhOMbQtzDJGDCi5JMVIBZXg3RHV53RypiO2qHmfzwRk3d6uUmC3dLq4S09xgJQb3srDULPKYD69GDhlDvMbczYjIai1lcUGj91XLA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0201MB2452; 7:EZfmBZi5JutMe/k6wEC4uBXdqQiUYAGMZOZxSg+2yQh+Kn1HfnRqi+klLxlQUmbewekIG9CRVUJ1qsVL3lKVfJXxREDvUbw5Fb8dcAgE7aN3FCMlAmZ25Fl9yw2d89SR+20OoLwvbTnV5mftTJHipo+QQocUeOHDaXKuqhGZf/LFkWAZVY0G+ZdCkeTGosr8jvrOx3hyFnN0HmuXU77920bJxgGfu1dhCNrNXvTejwJPdJkUxucbVIQRj4b3AvFY X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2018 05:18:37.5607 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 791ce5ea-9171-436a-bc6e-08d5d66d485b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0201MB2452 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180619_221918_721627_53B7D75A X-CRM114-Status: GOOD ( 13.78 ) 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>, 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>, 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>, 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>, 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/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 5a26ad93be10..29c36f95d624 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -213,7 +213,7 @@ static inline u32 log10times100(u32 value) static int drxk_i2c_lock(struct drxk_state *state) { - i2c_lock_adapter(state->i2c); + i2c_lock_bus(state->i2c, I2C_LOCK_SEGMENT); state->drxk_i2c_exclusive_lock = true; return 0; @@ -224,7 +224,7 @@ static void drxk_i2c_unlock(struct drxk_state *state) if (!state->drxk_i2c_exclusive_lock) return; - i2c_unlock_adapter(state->i2c); + i2c_unlock_bus(state->i2c, I2C_LOCK_SEGMENT); state->drxk_i2c_exclusive_lock = false; }
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_bus with the I2C_LOCK_SEGMENT flag. 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/drxk_hard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)