Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1164891ybi; Sat, 8 Jun 2019 04:01:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmMiIZ50yJy5Cx4J/Ts/czGJlS6WmuYwUBkatJKKiiiV38DC6M7xaPphqE/KshTVyfRHH+ X-Received: by 2002:aa7:808d:: with SMTP id v13mr63589048pff.198.1559991705576; Sat, 08 Jun 2019 04:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991705; cv=none; d=google.com; s=arc-20160816; b=vTdHTHOLlJg7FLlAn2SJf6DeUwigYxZ0OAnvXvMa26YXIPinQyc1v8Jgn/D/VKUKcv PoA7st328FWEgUi9WnUcZuFIcsMJEVrN5M2AGYO/GCucpJUnN4+JANCvPlDWbag/MSWb g5sQwQ2Gze0tbRHvrRvwx6QG12z5/Fd1l3sEdECTDFqkoFAXuFgUYQeYCvhvFfIC2xdb umNIB45KZ3GJxPlAOlk0LvH+ZSjdVLGSjLzy8f25PzJWUr+SPZJKuy7zVM/c5lZBotd1 tGck9ALX5h5w1poj572U8erZXiYXKjAy3EQcn3h48e3mVYoxW1E7SL2357VwQe5oqQL+ B2+Q== 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=GiblxHbw4azf4juOZRFJUAPF7oj3eJDB8WPGWFuaEVY=; b=ztiCb3J9/fuEz6Z9ukRvEUwDb0vjqmcgai4ZZsljL0JHov7nk/kF07IuOXFhpcGyAH Po9kCbGDT1NpHLUHAPGdW3IjB/6Nn6GhMhomTQiFmiFMZ5hIHQnfp9hYdM8PyCunUjZx NXXgJjb/wefpl+7kMKf1wLhzrXrWNOEJ+znwdJE0Op1fGIL3YdEHFFI/0vohNSXcsfJr g6yNwXjFpnGlO1mOdGQoa8UwyQzxpccscdyUpofuGjOuIopwTxuy2Nm7pQ7hEJNmGb4G ped5XCmJNAQXhz2W1YsATq35GtP3SBMCVVS+EJrIW0GQdT4QhiuxHv3BMBQ0MFnUqkZX dfog== 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 w15si689580pll.173.2019.06.08.04.01.29; Sat, 08 Jun 2019 04:01:45 -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 S1727504AbfFHK7m (ORCPT + 99 others); Sat, 8 Jun 2019 06:59:42 -0400 Received: from sauhun.de ([88.99.104.3]:51874 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbfFHK4q (ORCPT ); Sat, 8 Jun 2019 06:56:46 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 98EBA3E4786; Sat, 8 Jun 2019 12:56:44 +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 07/34] media: i2c: mt9m001: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:46 +0200 Message-Id: <20190608105619.593-8-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/mt9m001.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c index 4b23fde937b3..2df743cbe09d 100644 --- a/drivers/media/i2c/mt9m001.c +++ b/drivers/media/i2c/mt9m001.c @@ -730,7 +730,7 @@ static int mt9m001_probe(struct i2c_client *client, const struct i2c_device_id *did) { struct mt9m001 *mt9m001; - 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_WORD_DATA)) { -- 2.19.1