Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1162525ybi; Sat, 8 Jun 2019 03:58:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQjBDwO54XZrEUBGH+x2sh/QwRBOpD77gN25XLmn7fYr1aI8/halMM4n2g93+xwrKcHf/q X-Received: by 2002:a63:5c1a:: with SMTP id q26mr7315363pgb.260.1559991530876; Sat, 08 Jun 2019 03:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991530; cv=none; d=google.com; s=arc-20160816; b=rH2Y0meiT6X/MdX9g54Vqj2tjiJl6oKs0FAtLq7lh/b80up0KEifV1Hw9k8H9C2SQh zoNCNineMFet6mMtAcvPqZbdKh3n38HP33l1wVXK0ksvulreE7j1RfoyQiOBaHz0QU8J jC7AtPNDL4nHQ7n9obZBcCDc33EkQvtYWGYhfi9bwf18hNzBiJdFJgh2AForehm5Yl4b RJEZXDC0d+SGOliQShrqfcUUyoNRbH5nvNLNWS7bYiY06/BcmtH8D/q105kjCQFdOG/l HsrwTaSBvr7dP+H02gAHF945RbL042iC9IsLSkbggzjx00+TuO4QHg/RywyaTqQu5gp8 HMng== 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=6bKWVnrao86kDntjlO8HW0Zv6GJXX4C7H37QM6XfUdw=; b=cGUpUycoSgntveufB4fM4BrmaCGPMR4sADOd1fWihJgv2Dn7m+pEuSbxBr93C9YLIc T7WCISj/ugWI6D45mq5QisGXS2dliVJl3hISFRMdZHAktSIflv8WRFU4FMa6crzDVNnq J/LeCeParKFtRAvXdNvIu0Cx1eBjACXEfsRe11tUp5+pecF1N6Q/nwneOW7UDLgaMZLD 2Bh28LlMS4TEmcAj96u73s3AfvaGgeYZftk80D2fF8zeyqqkpO5rDy4E+sFvtY28fPQi yKPnWfw3wws7PYPJvp5QJjjy6X/qDn79bWlw5pkoDW/n+hYAD9ktcgLv0p7b7bEgiolB dUcw== 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 b38si1123951pla.65.2019.06.08.03.58.35; Sat, 08 Jun 2019 03:58:50 -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 S1727215AbfFHK5B (ORCPT + 99 others); Sat, 8 Jun 2019 06:57:01 -0400 Received: from sauhun.de ([88.99.104.3]:51870 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbfFHK4z (ORCPT ); Sat, 8 Jun 2019 06:56:55 -0400 Received: from localhost (p5486CBCC.dip0.t-ipconnect.de [84.134.203.204]) by pokefinder.org (Postfix) with ESMTPSA id 9E9FA3E4771; 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 24/34] power: supply: sbs-manager: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:56:03 +0200 Message-Id: <20190608105619.593-25-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/sbs-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/sbs-manager.c b/drivers/power/supply/sbs-manager.c index cb6e8f66c7a2..4c29a89df968 100644 --- a/drivers/power/supply/sbs-manager.c +++ b/drivers/power/supply/sbs-manager.c @@ -317,7 +317,7 @@ static const struct power_supply_desc sbsm_default_psy_desc = { static int sbsm_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 sbsm_data *data; struct device *dev = &client->dev; struct power_supply_desc *psy_desc; -- 2.19.1