Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1165469ybi; Sat, 8 Jun 2019 04:02:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV6vZBRJUkyDKQNn0J7GyS0XREZSkZamvAnRvzdaZdnLI0Lb3TjxZrvCvT4ea1Do8MGlPs X-Received: by 2002:aa7:8acb:: with SMTP id b11mr63335138pfd.115.1559991739275; Sat, 08 Jun 2019 04:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991739; cv=none; d=google.com; s=arc-20160816; b=x8JjsxXgSWFooJ8Y7Qzc4ODhwn4BWmS1Rlf55RJ/WwVveQiL/G5zDDFiY3L5Fuy/+Q dB9kqD377YNwhOAPPgRCZWaP7d3ueItSTHzDINJhet/AQNOT8+uskwCLbXfKyYq+a3U0 RO38/562z/wB8rPScAFGwvrZc0XNEXGjOEfuLhKyD5Ig4ey4tZ8jKBxxnyqHg+WN/X8G ErRF61Xy+smFOyTHVLHRHMl9GfUnMIh5e2EJu3wUfTzAhLOUcKOt7dmYYxLArgPFcq3F oMzfIfLLlE2WtXaMGL3F+47iRZThRs7KXS+iCMVs0x+nedZnWUlEsg5KM43wYF2xCQ9d WjMQ== 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=XCOJyNkY/TG7UeO/YYK21hPEpmmYjRhBTCfrG2KgL+o=; b=0lsshYpD63WHG9W5iVsWKAKAL+u3MmUwWcWuIKPKRP2c4UL1ZTvhR5jHfYaeR8cLLO 9y8K4AUJhgmQxCezRxBNrQ9108vj5fjFICufcYWen9dIZhte/9cE9JnLiO7JYIPW/woF gzTPd/2BL8dtzJmoBQYJQEuljXkQYK3QEPWjaLaUNMUMPDV1GDPNAocfjknWOfHrT1+a AvPgHtnC7lOdac925tsOBvuz0Zaxr+7Oz+LgG9BIvv6N38L9mrzNpzREmMAYqLJ1YozE weOhj5QoKMBggNzXpEYwx8nL5m3jG91j4t2YM04Hb189pFJvfVkG60k/ZMKcuwXg2XC2 3WTA== 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 b35si4529160plb.249.2019.06.08.04.02.03; Sat, 08 Jun 2019 04:02:19 -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 S1727650AbfFHK7D (ORCPT + 99 others); Sat, 8 Jun 2019 06:59:03 -0400 Received: from sauhun.de ([88.99.104.3]:51928 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727054AbfFHK4u (ORCPT ); Sat, 8 Jun 2019 06:56:50 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 6A57F3E4794; 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 16/34] power: supply: bq24190_charger: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:55 +0200 Message-Id: <20190608105619.593-17-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/bq24190_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c index cc0dfdc9e85a..ec03521c46d1 100644 --- a/drivers/power/supply/bq24190_charger.c +++ b/drivers/power/supply/bq24190_charger.c @@ -1700,7 +1700,7 @@ static int bq24190_get_config(struct bq24190_dev_info *bdi) static int bq24190_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 power_supply_config charger_cfg = {}, battery_cfg = {}; struct bq24190_dev_info *bdi; -- 2.19.1