Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1163912ybi; Sat, 8 Jun 2019 04:00:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmssLKF2zbzhFL20xIPA06sc0wrS0udC40HI3aAAcN6BVJYWzizz6W3VTqawhK2xaNvuFM X-Received: by 2002:a65:60d2:: with SMTP id r18mr6989583pgv.217.1559991648247; Sat, 08 Jun 2019 04:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991648; cv=none; d=google.com; s=arc-20160816; b=p62BBRXFtgnfpgtkcBmR78SzV8D4ZnTlhJiCTm0xsRW0XC/EIVoD8E4d+g3w/Cn5xc Jf43O6Z9Ye0hkAodlT9CQrYjGjBgdq5bsptqcanrICAhToIp56k5UWTf/8YkeoZta856 IVpwEZaqqtHp+b8531CBDTflVp0FbkUoz01ooN1i7uGCy/XV2nvCtc1zJWHK8ispzu07 3A7OYcB9NoHcT7eGsuO2+kK3W48EcMI01bA7u0X3krS1xGqE0Edly69yFaiYQyFLHf90 iW4hJ85P2WVH5Z5ADwnYBjRG1dhkX3csg0qO6WuFByXeYdVttXZjDJGWXVvH4RNP124N c1jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Qb6W+dqP3fwT+hhSFIRJ9DSMdxWPeSEkamI0OYXxzj0=; b=fVSv1Syuua3Zf25uzYu2dnIg6qGJIF3p1XGs9a6/bkljGx8Ok/XgSUjbga02Sez4vG DbLPMt3AKyzTLjmkeT/5ylQkkVe3YJPBFWbLZyBiX2C5R98C3c4GeF7F8m6DUMrjyDSG N/q9D5Na4DYeYYAJz8MIThJV+6atLEeqYB0tnj1cihFJuog1p5RtJyOMM7TP5uyOq6Zh bY2qS+hGvyndSp1qYVaNgtKf/VnMsWoHH1r7rJOJzasLjCyYJQcC2/lTC0Dts7/ZuPhO QUfXlS2fHOLXCVRaa8unB5GMO6xMI6w51dF8MxzI+DL5Yibjq0yfaD7yvFo9p7hQiNRN 7oDg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si4561941pgm.479.2019.06.08.04.00.32; Sat, 08 Jun 2019 04:00:48 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727136AbfFHK4z (ORCPT + 99 others); Sat, 8 Jun 2019 06:56:55 -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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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)) { -- 2.19.1