Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1164823ybi; Sat, 8 Jun 2019 04:01:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0bqEx/7UV9QYi/5GD1Icgb74JXhYYMUc7fFLnewQ3BO00pfgIyVaHmkBSPvo8GJYe5Hvp X-Received: by 2002:a17:902:29a7:: with SMTP id h36mr8281397plb.158.1559991702027; Sat, 08 Jun 2019 04:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991702; cv=none; d=google.com; s=arc-20160816; b=KfdDooQSKaWBQ2J+xclzcNYNeveWOMWmt5G8unnpJ119kOeJocBiYL41npV+3oQz7s HPwweu5PedtvHcTnfDP5QbzOY9f7vAJ0YSph1k4TNexyqYbe/TKqgsR36Gk9EFKiLKmd Z849iThyH3Aix5mt0UZtiOOgqnbo4Y0LsV3PnR9i1rzasjGQFZ7ulxzyqLKO4pdo/NHR EEto1ibViiXS9Qb+UtF2Ko7Zx4HTrzNnCfbe9nhHImrr8xFQ2l45jVTjXdR4y8cYNvgo kbVvphunsKsJyrAkSCTNFl0PFPcp6dY1mxv8IKKWV02TpZWzlXoLNWTihYfHBSIuDpQ1 QUTA== 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=z/jhLaW5tR9vfiqEyB8nD8aMZVCc500Yw0eLYWbM7IQ=; b=SazNZ0kI9cjI88Ndv6238I0CISl/GpJsDhSWBsYiHe4T0lBaVMT3oowTYUjFUL+Kc1 xOCKXsENlaztDNib8ijIW9Dc25iHGjgRww1OsnbZPtUbwPAIomew6P4Pql0dmbw+gtFy lj7QmZzkDjQAqTW1Mze57g6T0rbwlETJ9cZ7RQWuBzQ0dhEK13fitkh13TnUL76mnJr0 DPMkon/5pykROjPAF6fpA0UikC8aLMQk1l3UGPzJeRCOsf9XYKSOi+qZJMCi+hgdAP3G sPcJA2+wf3yXrO1pRWtkZ+r6VeRhAdYFeSTszKv9HYxQdZcJf9gMbm0wpE2HYMh86sOx 1pEw== 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 v20si4638103pgk.58.2019.06.08.04.01.25; Sat, 08 Jun 2019 04:01:42 -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 S1727429AbfFHK7g (ORCPT + 99 others); Sat, 8 Jun 2019 06:59:36 -0400 Received: from sauhun.de ([88.99.104.3]:51862 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726959AbfFHK4r (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 AFB173E4791; Sat, 8 Jun 2019 12:56:45 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/34] media: i2c: mt9p031: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:48 +0200 Message-Id: <20190608105619.593-10-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/mt9p031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 715be3632b01..5d824dd33edd 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -1034,7 +1034,7 @@ static int mt9p031_probe(struct i2c_client *client, const struct i2c_device_id *did) { struct mt9p031_platform_data *pdata = mt9p031_get_pdata(client); - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; struct mt9p031 *mt9p031; unsigned int i; int ret; -- 2.19.1