Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1163690ybi; Sat, 8 Jun 2019 04:00:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEEvVil+y3VG3Mum2KQPqTXFz0kbmWwWs2yuaU3hpMaz1jw15GmTwsGdZHWFB5zowC2FVn X-Received: by 2002:a17:902:29e6:: with SMTP id h93mr57657353plb.297.1559991632039; 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=NMWQydFv0wMh+LwdQgIrb1rtHkGCc+TdtIGv0ASkZsazyi9ZmblmAnTeBb+PL4DyJL vGHCxqKIva3/f+f3YQDJcmOur9yQIwNZuOvSSyD8B+tGx7hwXCC+/2sj4m47w5ahZk8S 9+iukq9k3xAPoQp0ZOk+bFkjbcKtmVR7MguMQPn/VAbjr7WvkNLxKwZWmXURqZtw5yY7 KyN9jX2XkqXq2GECMuj2NMSMODeEWFYWaeX+Lg8hPNpyvxMJuFhSrwuJDAQTn8YLNw9E QypeAVBLiyjZNancXhWk80+RKUEABhnIHZRo9DyPi+6/o0rM8DjC+3b+a02fi7qX6Mnh UCNA== 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=2ogfcLc1QaWKte2FsNxdCLUKvtva77hRFD7uoUSJwnw=; b=EzDbvGGdIzCo+RGGK+MYm0hKRK4zI8T4Z+RbAUbk1/mgRvzbJwU59eFBZYi1jvLjMm yz35cqO0o0JhpE+a+raa7OTFlbd4SwMg22h/GmWJt5khY76Cp9TjAfgG86w6VgCOR4wG S37dFQxAV5Yrv+Hql/Thht0edON2tUruYc1DQgGh3QJOMmteM8cubCkV4L6ecNXx/6Mt a2t73wE4PrZEfJSlWCMq+ZTQ2moa4M/pRNBuSSBw1KOfSOgY3TgDUpIjLShMY/UOElSn dGXBNvU8JTVlx9WBcIm2omnfj+SosZd/Xp8IHXiU+fO8wECSA1SEMRfAQE7EVE4ssrNK 3Wmw== 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 f13si4458953pgs.90.2019.06.08.04.00.16; 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 S1727224AbfFHK6e (ORCPT + 99 others); Sat, 8 Jun 2019 06:58:34 -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 S1727116AbfFHK4y (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 1D4E23E4770; Sat, 8 Jun 2019 12:56:53 +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 23/34] power: supply: rt9455_charger: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:56:02 +0200 Message-Id: <20190608105619.593-24-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/rt9455_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c index 40a9d329418a..29161ae90245 100644 --- a/drivers/power/supply/rt9455_charger.c +++ b/drivers/power/supply/rt9455_charger.c @@ -1584,7 +1584,7 @@ static const struct regmap_config rt9455_regmap_config = { static int rt9455_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 device *dev = &client->dev; struct rt9455_info *info; struct power_supply_config rt9455_charger_config = {}; -- 2.19.1