Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1164059ybi; Sat, 8 Jun 2019 04:00:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwHKhWbsylPPdc7nd3f/wuqzZikuYuGOxnxDYixOv24h/n/bnkqdjQ4y+pgj+uP4Po6osr X-Received: by 2002:aa7:8108:: with SMTP id b8mr64649461pfi.205.1559991658736; Sat, 08 Jun 2019 04:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991658; cv=none; d=google.com; s=arc-20160816; b=1KaJMWct1KWu9CesC06EKTMEnN45cqotrcfnlzix/cuAzGWJ65P2qoTpdNvHnGQSoE Phpc/SdIrCdC+EID6G1hpZmJY6gibKm++jkW1vBa6ckpQmEWyJiqoGaQ5dbKupMxXeFl qUOqym08r1cGqLyaswX+vhG3XC6YlzlPwXc0LEDQNqRDrLbr2Mm6/H+RWbcdRa17HkUi +PFV+UfpJ2N26h5CSkqgyx8oV89vNEeOSRxIuUhVGXjYQxXkWSao4/7EmhRVz7Epf3sP 9mV0BEvRNdkwhHZKALTyc/WIjLH/xFJz3j2PZfOogOtFH0tdH19tgQQXUXA+Ygtc9wcX fW+g== 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=0+WwpvpyHMLtzv85r8ZJmNlxAEY7JqfRueUqwudeAX0=; b=vPoIKgmNJT1QWibGLMH8ATf0nGpSXJ1jkkFmFf9GaOJCs94bZJi3r4xOA7SuGuVJJF Fmr7BKbwYE2VtBZX2Z5FW4K2yVu5vF819gAu8RPL5YcHE50U13XFyNHFGmtbb+w8lyZa QK4WAGo3o8gN1BpUMnQpW08dVJwUsv6c3q1ncv57HKiaRqb29BlZPx9tw44tKJ0RBPBZ p7woBo+fqblstodpFW+rJ7wQB+GGe0Q6Ebjg/NG2qAyT5QX7S5zPb7zSAooLgDxhVaBS w1smwJwcz73rJSTW5loMfQK/uu7j+2skKZXk2ZX2VuU32ho59yWrIICCP3y3YF/eE0lR tP6g== 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 w129si4642574pfw.149.2019.06.08.04.00.42; Sat, 08 Jun 2019 04:00:58 -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 S1727628AbfFHK6x (ORCPT + 99 others); Sat, 8 Jun 2019 06:58:53 -0400 Received: from sauhun.de ([88.99.104.3]:51934 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbfFHK4v (ORCPT ); Sat, 8 Jun 2019 06:56:51 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id EB3A23E4795; Sat, 8 Jun 2019 12:56:49 +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 17/34] power: supply: bq24257_charger: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:56 +0200 Message-Id: <20190608105619.593-18-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/bq24257_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/bq24257_charger.c b/drivers/power/supply/bq24257_charger.c index 7eb58f10e092..eb151687beb3 100644 --- a/drivers/power/supply/bq24257_charger.c +++ b/drivers/power/supply/bq24257_charger.c @@ -950,7 +950,7 @@ static int bq24257_fw_probe(struct bq24257_device *bq) static int bq24257_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; const struct acpi_device_id *acpi_id; struct bq24257_device *bq; -- 2.19.1