Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1162645ybi; Sat, 8 Jun 2019 03:59:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUfhstBc0NPR3gAVW90vwoJkZCgdWz7k0AGp5FfUOkEDADwxjm+285HmLJmjEELB9/2B7p X-Received: by 2002:a63:2d6:: with SMTP id 205mr7121570pgc.114.1559991540922; Sat, 08 Jun 2019 03:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991540; cv=none; d=google.com; s=arc-20160816; b=AoQWAYneBM0VWeGB5HjJ5SDhV9F+jnbARsimT6uhGXe139yY4Sce5wbnQV76Dezho+ Kt9MtJARJ5EAGkdp7Zh+lSNyNCv3JhDbAR2I4HeKPlNaMkSS/wcY21ydY3JREZ1jzMSN yzmuB06KuDQTzPbmv2DIlRv1yvDArLBru/UrccGjJt48mkJVfvo3gFFI15ToSEWPghXL E3UUCh2HKIvKSKMFyB9nJcVKkra7Z26pNk+Mr4wFiJ8ZKFMIuZfhB+vJflyBDlpmaoRL ZP1NuA1FOunmGzO0PrQ60bZAyeoxAQH2RWyNDAJ4lxzk+00eovVrrhGEjR/bd775HPxW lXtw== 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=vRuLEzYD6fRGwprzjX4IzOhFCKGkxZl2miwvybbBMR8=; b=Wah444enkHpMm3nXl31SpMbCTAUqoqkXokXSUaG/lwR8FEDHqO3wYbJhC39MkRIAmo T0tRO6Si+AkNZV7gGLXC99n6jMPMNHWir9QPcsCjWwSAyNLWckPt+O5XRKQ4wyVtqWRP hbbg9Q+RpX90pjPokgB1eBSOwAq2kjeIOEcrYjhurHlHiHzpmrzzK4FFRGQP7U5ybH5f VcyGJPjwDrcHxa2VP9Oz6AzEVzn/EOucdkhIxGUiRRNQdzkx9zZmAad74FuZDhv8pNl1 wTWZzzPy2ZUAQW1VcfPquM/IXmMwm4naHcxxlIUgehcwP9cQbu6qXwuu5+vBJCKQeQwa 2tog== 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 65si4404787plb.39.2019.06.08.03.58.44; Sat, 08 Jun 2019 03:59: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 S1727198AbfFHK47 (ORCPT + 99 others); Sat, 8 Jun 2019 06:56:59 -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 S1727067AbfFHK4w (ORCPT ); Sat, 8 Jun 2019 06:56:52 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 77F333E4770; Sat, 8 Jun 2019 12:56:50 +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 18/34] power: supply: bq25890_charger: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:55:57 +0200 Message-Id: <20190608105619.593-19-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/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index b2ff82b4707a..d333f2b321b9 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -817,7 +817,7 @@ static int bq25890_fw_probe(struct bq25890_device *bq) static int bq25890_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 bq25890_device *bq; int ret; -- 2.19.1