From patchwork Sat Jun 8 10:55:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 56741 X-Patchwork-Delegate: sakari.ailus@iki.fi Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZZ4Q-0003QD-9s; Sat, 08 Jun 2019 10:59:34 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbfFHK4s (ORCPT + 1 other); Sat, 8 Jun 2019 06:56:48 -0400 Received: from sauhun.de ([88.99.104.3]:51870 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726974AbfFHK4r (ORCPT ); Sat, 8 Jun 2019 06:56:47 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 3D39A3E4771; Sat, 8 Jun 2019 12:56:46 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/34] media: i2c: ov2640: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:49 +0200 Message-Id: <20190608105619.593-11-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190608105619.593-1-wsa+renesas@sang-engineering.com> References: <20190608105619.593-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman --- Please apply to your subsystem tree. drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index 83031cfc7914..30e7e6b2b293 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -1197,7 +1197,7 @@ static int ov2640_probe(struct i2c_client *client, const struct i2c_device_id *did) { struct ov2640_priv *priv; - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; int ret; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {