Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1164090ybi; Sat, 8 Jun 2019 04:01:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5tCe6j1YOyWiarEWj/BhT3bsorhGy1uoj+ygR2pjtEJFEEuheLu3+imcbOaANFvSfzhXP X-Received: by 2002:a17:902:29e6:: with SMTP id h93mr57659149plb.297.1559991660260; Sat, 08 Jun 2019 04:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991660; cv=none; d=google.com; s=arc-20160816; b=oejEp53baa0i3FMSadPSygiBT5BRte+EUeFkLqbrmJ142a60vKLCogoezEjrKyhIE2 rL+YI1FEcdrj9RqaMp6cs8tg2jZ892llzAc6qXtRM/BDydthLvKClF0/9a21t0ecZueO 4S6nWqdQNLOCHQVBTAv89mhGw8rDG2tfDM1mNj70cC13ZjYEhtjo9NjMnV+MXDNAJOyT /Jiv0IGpExicxKX3nfAiJT6pcjVNk2dzzfiOwtcL4XUoWDg4b9AKaL+sRTYco95LnuPJ EGIczQJ6PQHcC/yhIwmcxSvlOfKYKIY615l58CpMvvnNENAfl7DKlKchMeNHgagha95o sLJg== 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=BYlkxZ2jm+38yQBha2mBjsboVm9nwFY8hd4uJVbHWAY=; b=DTAXW9p+AOHZ3VqTJ848bu2X6HyjsZEeeMTucEsXifLCHQAODLyNZEGNofSoxd5t09 xNnynHl6q16zaGAVsz23TUSE9LBRVkVKO1m73qwvqLet9OEzwcLFlgWsMcKkTx1WeHuE mTeMW0qM6Z6aw/iV/YWen70WVO6m8isv66UO6LQoGr0TMk7hhpYZ3YqV18k7DtNqXvJJ NrQ5R2FxcqNEP7MlGERNkHBZmNAujgLuWUuuxCia4mJ4ck6PLoeV5Ej4syzt1tx365sU ljLctu8ukZHxNDF8pbQmHqYGj7zTCwwX4rqe7cx3/Ak1Tbwxd74eL9+7IfT+yucazd3Z WT1A== 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 cc18si4759113plb.174.2019.06.08.04.00.44; Sat, 08 Jun 2019 04:01:00 -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 S1727605AbfFHK6w (ORCPT + 99 others); Sat, 8 Jun 2019 06:58:52 -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 S1727083AbfFHK4x (ORCPT ); Sat, 8 Jun 2019 06:56:53 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 860583E4786; Sat, 8 Jun 2019 12:56:51 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 20/34] power: supply: max17040_battery: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:59 +0200 Message-Id: <20190608105619.593-21-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/power/supply/max17040_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c index 91cafc7bed30..62499018e68b 100644 --- a/drivers/power/supply/max17040_battery.c +++ b/drivers/power/supply/max17040_battery.c @@ -193,7 +193,7 @@ static const struct power_supply_desc max17040_battery_desc = { static int max17040_probe(struct i2c_client *client, const struct i2c_device_id *id) { - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; struct power_supply_config psy_cfg = {}; struct max17040_chip *chip; -- 2.19.1