Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp389968pxb; Thu, 23 Sep 2021 02:18:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyosgG1A8923vPoYgKiZVevf2dEXCWFNvzFldetkanWWgVfsMFao/isAuBw2zdIvHVn8+Wt X-Received: by 2002:a92:cd09:: with SMTP id z9mr3032664iln.50.1632388738869; Thu, 23 Sep 2021 02:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632388738; cv=none; d=google.com; s=arc-20160816; b=M2QyiefjbC6GCEKJTZAfAkYMpcvLUsW5I3QhI6RKVd6qpyKseXxWQwG+v2q8onbgBp mAfIwjzS7hh26WfFXxagbSEiSRKQwfx8XbFxjzMPls4VzQPOlCz6bSwiDideE0exUT0f AjEkm2ApcEc487yu6V9gGnDnjY6tR2KRY5xMPPh1249lcGRZSsYecAMg4XR4huqWK545 RUqoxeK2hCdTHYUtIzqP4mWNguKHTX6rla9M4Iqff/vKQ+Q/V3P6oKpnZ93dR5LrURbF AOxBi42TGn8o+503UdP+Xl8rnv+HTsPUOHp4Kce//SibvjBT1vgnVorzR7pTEApFjNmU yBvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=KI9PrJZdQvdsDtKthCCZyCqVhK93ZFQsSH7/1GmneSI=; b=eZNMT7QD3zbfeQfTT1zdN7c/d4R/w/xyXB4mv804Je44XosxK8VcPXgFyiU0O3fz/3 46ImU02zBi5uctAOU+hPulIGEovdjHRvm06p+hXiMEZ5z6zXrhKZnNOoyg/nwZlCefQo raldDZZSuMaOp8lBK3EhzSSzRTkCkXlvBNzYnYU3/iOrbmINK78DTScP0p9O7QUfB4R3 w9GzAttnprIp3O2xrpwOdD6FnZQOYuH5bhYfMHzLD+G7ha1FNtfc8TLYjT7HBYZ/yklm Jwh75ID7wmqkKM1jiXibvNey3eLucviolgnIhLYKytmda58rDaiiFiCjwexxXs0WmGzh nIOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si5500897ioa.54.2021.09.23.02.18.46; Thu, 23 Sep 2021 02:18:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240140AbhIWJSb (ORCPT + 99 others); Thu, 23 Sep 2021 05:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240124AbhIWJS1 (ORCPT ); Thu, 23 Sep 2021 05:18:27 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0891C061574; Thu, 23 Sep 2021 02:16:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id B67B81F44019 Subject: Re: [PATCH 6/9] iio: common: cros_ec_sensors: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Benson Leung , Guenter Roeck , linux-iio@vger.kernel.org References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> <20210920090522.23784-7-wsa+renesas@sang-engineering.com> From: Enric Balletbo i Serra Message-ID: <716533b5-380d-be72-b45e-d9909f09286b@collabora.com> Date: Thu, 23 Sep 2021 11:16:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210920090522.23784-7-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On 20/9/21 11:05, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang Acked-by: Enric Balletbo i Serra I'm fine to pick this patch through chrome-platform tree if Jonathan is fine, or can go through his tree. I plan also to pick patch "[PATCH 8/9] platform: chrome: cros_ec_sensorhub: simplify getting .driver_data" Thanks, Enric > --- > > Build tested only. buildbot is happy. > > drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c > index 28bde13003b7..b2725c6adc7f 100644 > --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c > +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c > @@ -831,8 +831,7 @@ EXPORT_SYMBOL_GPL(cros_ec_sensors_core_write); > > static int __maybe_unused cros_ec_sensors_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct iio_dev *indio_dev = platform_get_drvdata(pdev); > + struct iio_dev *indio_dev = dev_get_drvdata(dev); > struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); > int ret = 0; > >