Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1163871ybi; Sat, 8 Jun 2019 04:00:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzFGmuFCamWSI13PMhf1TQi0BUTjP1MSXLDhEJdmpkLzUzGKZYDgLLqhabE1A2gkmyNvk/ X-Received: by 2002:a17:902:864b:: with SMTP id y11mr57219900plt.92.1559991644669; Sat, 08 Jun 2019 04:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991644; cv=none; d=google.com; s=arc-20160816; b=R+/7qB1Jns1B088QWPL2gpPQ6m8dqIaK6zc3NrC7WsMdBataRMUI75Kv0cy8jTx86U pnIqIRJ5TaojgVKFU6GmBAnumhsEgxau6j3cwWtWefH/mUa0Gk1mb2lRc1jjYH5l36C0 oZwowH67GTEVH//Vt6QuUbBDVya1DHzQ/WGeFZ9fjjLgIzhWDGFFx0/EMOpLVyQ40dup YhunCuz6XC8CQnd0/PdQc02RXX1z7qB7891yGKKr7AyfZzJUUmODPPJ5eBC/UUI220AM N54Uu9Z+xym2ICmBBQOTSFZ27rMbLSHz67MamsG8Zjvlw7LoI0vf1+wwKxv5e0LR9RGi cQcQ== 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=iDTYH46zGOX01YFTFi9OJAXFQSaxghXdp9SXvcFRGNE=; b=nXDselBHyi+RZ+sBh8wIa8IhiAiIC5x6R/17uOg2tWVzoTm+jhSV9vEAUO++vrBuZu Zj7Vv+toxmI0NDU+e+ArCPtgI+s6seepNIsttNkVzWFOUEE7gJLSWmd3lo/mr2FAmykR nxZTawhE5g9oCN3JJFlX0m8eVjCwrn/6p77ho99IlXM2E8qBNFIHIAac+REjZC4Z09tb s+F0OYmXnN+Dxyo2s7NM3CV12ZaMePCIRYCQqIFQNFXr/0+IRwjmkrYyPODsv6xRVIPZ MUFN/OGifbQmKbNwnTXyx/mgfYZl6hQ+NUlzCkDx99SAND5gV9GaHn/4P+4PBohk52Sx 25gA== 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 j8si4413567pfh.239.2019.06.08.04.00.28; Sat, 08 Jun 2019 04:00:44 -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 S1727607AbfFHK6p (ORCPT + 99 others); Sat, 8 Jun 2019 06:58:45 -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 S1727086AbfFHK4x (ORCPT ); Sat, 8 Jun 2019 06:56:53 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 124073E4788; 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 21/34] power: supply: max17042_battery: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:56:00 +0200 Message-Id: <20190608105619.593-22-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/max17042_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c index 581c6bd23388..64f3358eaa3c 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c @@ -1005,7 +1005,7 @@ static void max17042_stop_work(void *data) static int max17042_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; const struct power_supply_desc *max17042_desc = &max17042_psy_desc; struct power_supply_config psy_cfg = {}; const struct acpi_device_id *acpi_id = NULL; -- 2.19.1