Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7047808ybi; Thu, 13 Jun 2019 08:41:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdsUWqU7uw0U9Ro/iPavuto+FmJm+4U9QqMx1Sr+7WKS10J0FLJPs3Y/NmJZG7pxRxUAAp X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr23095291plb.139.1560440504264; Thu, 13 Jun 2019 08:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560440504; cv=none; d=google.com; s=arc-20160816; b=c3yCdv6ZoxRul9SsoFrcMDaimx6rhmFSkpWVlOFFBoN/tbDxcORae4tLyF/SIp5DNT TNkVtKCJhi8jt8aFL37XMq2XeTbaas4uboFlK5wzs5BQk6o+CX8al3NkD17NFoMTXjh3 FkHwmE0HVJCpHb51Y4XFQ/1fMxPn7ON8ABsyVdmalUCzMAR6yA8vqEYTguKnTU9VDSrY uRsPiH+pCF/f8aBiidbnrJTmD508NbSNXEop2Wbn/g4lEsLug3KGMyIabDjlMpn6hvPG ck/ee6UMuPq3U/6y7sVq6+zZZicFpfd+Dh5jA2HJDq3ND8U4AnMzQTHdqcKtNjlbo/ek f2Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organisation:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cuXqFzqlkEWkcHFsd+FEjBlkEgDSfVgRIoRvMitaIl4=; b=NYBDh4i6AkGq/BAXb27hlhgzXTXbgfyTapAJs+gPeLQqPpvNBGLDY1g0h7bUwYtXi7 YII5vvyZvOAc6/8taH5CASNFS3J+/WNyyLyFlV4fZAlDtv/xekd0iu/ooaxI9maOb5iv qOSbx5CRJtgEhNiWtWfvPJRqp3gaxIHgyQX1ZO18B9kMx9FZzMF57qlvzZ1dHKR/tgso GKfhFCpwrrznCtkxTCu7olX6Ebx6Vwa3/zywIk1026GfZZPxYSk997xKU2H3uBaPxPgS xWZBQww04O7ICOGTP36Tk+f+TO9Ah4GOoMR8p71YPOafFPIE7GuRWJsjh1SrP78RR+DY MAVQ== 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 i124si3091498pfe.139.2019.06.13.08.41.29; Thu, 13 Jun 2019 08:41: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 S1727763AbfFMPkj (ORCPT + 99 others); Thu, 13 Jun 2019 11:40:39 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:40780 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731897AbfFMJwg (ORCPT ); Thu, 13 Jun 2019 05:52:36 -0400 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id 9B93725BE33; Thu, 13 Jun 2019 19:52:33 +1000 (AEST) Received: by reginn.horms.nl (Postfix, from userid 7100) id 3D579940483; Thu, 13 Jun 2019 11:52:31 +0200 (CEST) Date: Thu, 13 Jun 2019 11:52:31 +0200 From: Simon Horman To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 21/34] power: supply: max17042_battery: simplify getting the adapter of a client Message-ID: <20190613095230.5dyeucsepnsnknau@verge.net.au> References: <20190608105619.593-1-wsa+renesas@sang-engineering.com> <20190608105619.593-22-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190608105619.593-22-wsa+renesas@sang-engineering.com> Organisation: Horms Solutions BV User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 08, 2019 at 12:56:00PM +0200, Wolfram Sang wrote: > We have a dedicated pointer for that, so use it. Much easier to read and > less computation involved. > > Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman > --- > > 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 >