From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18502C28CC5 for ; Sat, 8 Jun 2019 11:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC0C2214AF for ; Sat, 8 Jun 2019 11:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559993990; bh=xfk2wRGEM4iv26ktKy2rXmXoYgltCUoUo9eEQWOVnKk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=eaH3l8s87OKIc3LpZidcaeHxpaJEsZSYf8VMlbvv49LwO4kQFCNFTsAQ5POcAQem1 BRMTjSq98a/Gx5g4Cx+vt0wurrg6LUjrbYMzTO2w7HHZKoSDYiIqAWRRnGlgsYxcsg brx/CeATjfZVj4gt9pED7299VE1qNggc9rtvNFms= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbfFHLju (ORCPT ); Sat, 8 Jun 2019 07:39:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:56784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbfFHLju (ORCPT ); Sat, 8 Jun 2019 07:39:50 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 338E9208C0; Sat, 8 Jun 2019 11:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559993989; bh=xfk2wRGEM4iv26ktKy2rXmXoYgltCUoUo9eEQWOVnKk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pQTRSkU4qclN1APUcAgyy15vvD+kWn8KddareEMCj0Tz3uURVBr/E1blj8GecqzcF ytzNymxwMaQLjhnd2RWVB+RUQ5m3j8yLq1P8etg6TPFubbflq8erKCTA+7ywJTH9QU rbo9ZcrQGZ5w6fQpqlMpk6s2aasGxd4ejYauI+qE= Date: Sat, 8 Jun 2019 12:39:45 +0100 From: Jonathan Cameron To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/34] iio: light: bh1780: simplify getting the adapter of a client Message-ID: <20190608123945.4bef51e0@archlinux> In-Reply-To: <20190608105619.593-4-wsa+renesas@sang-engineering.com> References: <20190608105619.593-1-wsa+renesas@sang-engineering.com> <20190608105619.593-4-wsa+renesas@sang-engineering.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sat, 8 Jun 2019 12:55:42 +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 Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > > Please apply to your subsystem tree. > > drivers/iio/light/bh1780.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c > index 340d64d0ac59..a8361006dcd9 100644 > --- a/drivers/iio/light/bh1780.c > +++ b/drivers/iio/light/bh1780.c > @@ -146,7 +146,7 @@ static int bh1780_probe(struct i2c_client *client, > { > int ret; > struct bh1780_data *bh1780; > - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); > + struct i2c_adapter *adapter = client->adapter; > struct iio_dev *indio_dev; > > if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))