Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1163486ybi; Sat, 8 Jun 2019 04:00:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNr/+qUqk/tomCWKrReZy2wYxBITzUNImsQwvuECBwHWkPiNWzISFo1B8sOt/ldhYnpPfa X-Received: by 2002:a65:484d:: with SMTP id i13mr6889703pgs.27.1559991619180; Sat, 08 Jun 2019 04:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559991619; cv=none; d=google.com; s=arc-20160816; b=JWxW/houeV0x5BYdEUHrSOsKm+uadwgUJkLMuc4MAAoKoy/YQb2sV5EMJEomrw7sr6 7SNZggGzGVO4AA3W9V0wia4IjD4VYx02y2hvcP07nx3RhaJ+BQDg5jxDQxmvcAel59hu C0vZU/lo+2QnJwgRYvpo5VTQtbEfspeJFpTNqBNKKWjwcBywsdTsjeRNeeA8O4AaDww8 5niluyhg+5NH9YeV5wFxpdPfmsjJgFSs2HKSEjX0+374AEkv3xge9H3j1WiwUsKMqwwR 828pRitEUVqj8RfVOySirsEckJQowS9OXJvFT4dO+Yxayhhvz9S0nFslWnJRPeZ84t+Z +Zfg== 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=HcO4DgKtL1azela2nKTmQYaioDUFelF7LvnFsjLoe4k=; b=h4TlEYDqyemWCXB+XKZ1Uzf09svCbli2ZVPTGptHw19UDcxNJAOZJZk37uQ8wzy7fC L1EyIZEZU60WCgWNWvVPHXqhwBLm6f2Ia1VJc9knYhhPQjSnuqWNU0k5CaWdC7B/7JPo c1K+BWwop6dY2oXenKoHajic+BVs6x63kiZnEgbsP8YL2WcnDMJ5+pCyD6BpKsF3ZtHR buIJ7ny15AYQicZSyG09AwF209BulKgw0jR8gsKQFAePjI49/qyKUwvPookjBtnc1BtS VW8ZOJ7uOeIRuzW7vjT3qN63gicvcA0ccDZsVocHWK+gMNAH04DrTXwNTohrCtOXTuc5 xiKA== 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 s187si4499012pfb.255.2019.06.08.04.00.03; Sat, 08 Jun 2019 04:00: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 S1727196AbfFHK62 (ORCPT + 99 others); Sat, 8 Jun 2019 06:58:28 -0400 Received: from sauhun.de ([88.99.104.3]:51874 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727130AbfFHK4z (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 2BA6E3E4786; Sat, 8 Jun 2019 12:56:54 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH 25/34] regulator: max8952: simplify getting the adapter of a client Date: Sat, 8 Jun 2019 12:56:04 +0200 Message-Id: <20190608105619.593-26-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/regulator/max8952.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index 2a123b87d9f2..5d3096e20f47 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -179,7 +179,7 @@ static struct max8952_platform_data *max8952_parse_dt(struct device *dev) static int max8952_pmic_probe(struct i2c_client *client, const struct i2c_device_id *i2c_id) { - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; struct max8952_platform_data *pdata = dev_get_platdata(&client->dev); struct regulator_config config = { }; struct max8952_data *max8952; -- 2.19.1