Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1163699ybi; Sat, 8 Jun 2019 04:00:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6HQgDyzRfLht3CETytZE2kOgBd2953WRdScYJMggpDQ8xxyKYBX1U/htZwGo4KmYZ3CQ6 X-Received: by 2002:a17:902:758b:: with SMTP id j11mr60146445pll.191.1559991632634; Sat, 08 Jun 2019 04:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991632; cv=none; d=google.com; s=arc-20160816; b=VC67Lv7h6l4wfu3vx5zUJtX/IPd8LOAcTF1vkPZS8QSS/MqVRa2SzWC6Lo6gJos1cc H9AkJe4FNbm9E6HgvoR7/1FDfvh+ThYsndhsSIDMCgT3JY1u0p2Y/7fENX/RnGik4iup 8Si3mWYuW2re2kNewxfn1BovWj81bL1ecaVtXW2NQI0CHTXqYxBAsEDMbvuikQ0FZ74H sF+dbi5dQP14voKI/DJlncP4r2zC73qTzJJqQeUovEgI45IZ/jPlWTvKoot7daKshB9v ni79Ir6juHlUTGmMjQ5QrkhWJh31+9wCTq2JJD5n2StBjmLPeJyCvYpz0FFfZTGbO2Lm 3tZw== 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=0tOUmUhFBwfWzTHmcbdkPM7TcrPJwooZCey+uCfXAIg=; b=qRSiXvOA+mrdxRUK2W/DLCZAXGH2u2A4VcQfXOfFD5NJSheUuxDDY8Q60h1OEVeCB4 Ghmw0EmtUBluAgZaOObvQckQral7tdrq8FTX59tsq9IPAdoNmc5KbvBdHMZzn7dJvKFf SBb88Bkv9okfIyHzvEosnATPZ2fNfHoatoejhcipBFurseV2VCF84EQbbXXiZibaqPKZ lmPR1dTO8GByzfHJee7bXqRGMPhidxYCsFwluhzRYa9BhvNEo2mf+8dc/bRZqVUbMntv o0eI+lsh+PmfgJm5oSTC+LdMPUc0vvNhNx3tvfsTYpweTBM8s0vlUgbOIMMXqSizx1WZ bMJg== 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 s15si4548827pgj.350.2019.06.08.04.00.17; Sat, 08 Jun 2019 04:00:32 -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 S1727590AbfFHK6j (ORCPT + 99 others); Sat, 8 Jun 2019 06:58:39 -0400 Received: from sauhun.de ([88.99.104.3]:51954 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbfFHK4y (ORCPT ); Sat, 8 Jun 2019 06:56:54 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 91DF43E4794; Sat, 8 Jun 2019 12:56:52 +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 22/34] power: supply: rt5033_battery: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:56:01 +0200 Message-Id: <20190608105619.593-23-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/rt5033_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c index bcdd83048492..508f825ff190 100644 --- a/drivers/power/supply/rt5033_battery.c +++ b/drivers/power/supply/rt5033_battery.c @@ -118,7 +118,7 @@ static const struct power_supply_desc rt5033_battery_desc = { static int rt5033_battery_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 rt5033_battery *battery; u32 ret; -- 2.19.1