Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1833360pxb; Mon, 20 Sep 2021 06:26:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEm7XGE4dk5BdIRwhsati0A/gnj9dHJu0X0mdicDIWfrV4XkDt5XR/J/iUBjpUhWTxZOeW X-Received: by 2002:a05:6638:1696:: with SMTP id f22mr19642094jat.15.1632144361240; Mon, 20 Sep 2021 06:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632144361; cv=none; d=google.com; s=arc-20160816; b=ufeLy4xqGRvTXCCzZ4t5Wtfhmklloa+5Q8wvj8wY7pu6ZnxW5jsEAy6EUIqVIs4sv0 AO65YiRMQeODoZOW1T/iblEndkz6/8FFrkoAtv7I52N4fUP05ohF1ZcMCbP+KvvsR0mi cEKeuzmasN6z2xtJkJFSo/7JQC5ABL6FZmo1dP7uLMiPfTJVoFvTaVawBCx6NK8+pz66 Oq6bz+Ld64htpo4XqM0+aYTiJrAoUoJUbFcGlCTK0My3SXaIg83DOpdoAXzdVqujWvTb ECEyhrJ9cgYdsl9TOqi1n1wNcU+UuLdgD12mpAB5CK0fVduIy4JlaCLACfcgedXpjnW1 NtJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wYuUlH3ZIN7Vm5VsIwiRNmigYB8D8Be2wD98tZdxoBE=; b=Tx/+GIUDlVASSvjIiRlHhpdX9ckyb777xA5lbG+1AqEGOoaZDPRVUS6u3lqp4H8AZo C6gP1gF2OBatmWfWxZS/GN96ebHIb9KMspsFXTaBxYW8dZ27/xtas5ls0XTbAzuj28t+ d/jT/vImSR0WzCT2mOz/Hawcu08vCo1Ti1l78o8y3dXAX9Ag6X1B8XpOJYty0b/fzoY0 nx4/NEuB0wbPxqUVExqI1ymw1PhedPutC15/PYEKNJ7Ed57OM6qU+1k8dhQDgYDjcJG7 MuFCsagk6y04MZQkGCpzxG9xT1VAYxOWbyeqE/JMDKc8BvAkq+PaBhBWlMBupkxU1loC iLsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b="Ld5dzk/O"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q10si7068127ilu.41.2021.09.20.06.25.47; Mon, 20 Sep 2021 06:26:01 -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; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b="Ld5dzk/O"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236110AbhITJIJ (ORCPT + 99 others); Mon, 20 Sep 2021 05:08:09 -0400 Received: from www.zeus03.de ([194.117.254.33]:54314 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236142AbhITJHR (ORCPT ); Mon, 20 Sep 2021 05:07:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=+UKNkOTxYKV56+ cBXEkABbYKt7nc/fV5beJYjVps6qw=; b=Ld5dzk/OkWa511RNMIDMFphcKNNjnJ 3uiezv7zR+e3S6Y89D8q7vzPPZmcpAwVMiwkrw3eRkVhDWxR3EkVCGqoqbS1oiS5 hXNET3nOU+yfRqfSaz6sk7Pi0zIYGm6hGUhIozdQkH7afvedzljMmIJUp86FxrnH 38UB198D6zxHA= Received: (qmail 2412719 invoked from network); 20 Sep 2021 11:05:26 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:26 +0200 X-UD-Smtp-Session: l3s3148p1@C4/0lGnMEosgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Jonathan Cameron , Lars-Peter Clausen , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , linux-iio@vger.kernel.org Subject: [PATCH 6/9] iio: common: cros_ec_sensors: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:18 +0200 Message-Id: <20210920090522.23784-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 2.30.2