From nobody Fri Dec 19 12:01:42 2025 Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8FB6187FF7 for ; Mon, 2 Sep 2024 22:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.83 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316168; cv=none; b=cgkh2CnPYKm2QVP2Bk4nfklZxkzchPiP0uEuXeTiCxEsjQZDWahnC1YRQCQremk5jbcN5LCYDhkeimLBd4EoZQ6Sm4lyOAWB/rnMMOf1yasVm4vPj2FoXxIyoCbdFc0Ngw3yl5+eQDUSNDvlkWAWGZjNzVyhXHYy87aaQqv1Zfg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316168; c=relaxed/simple; bh=3dUeMEczuVrufl8SGQjkyOoqnQqLp4XWk+aY6v1VujM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q5QIxw5FIn6R94xncra5qHGdAjnG8PkbdY/fNcPqdspzKQ/PQNT+uS1UwKvAScWzzFfWAu6o4D08CarPgqrIahozoMnvYRpemWng/qFMG92FI4SBzX57nMqUihvzpq1DfYUKFCF/4wzaRnD4YlzFYanUtV7S+a15etePOCn6G+E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-25-87.elisa-laajakaista.fi [88.113.25.87]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id b330a4cc-697a-11ef-abae-005056bdd08f; Tue, 03 Sep 2024 01:28:38 +0300 (EEST) From: Andy Shevchenko To: Jonathan Cameron , David Lechner , Andy Shevchenko , Michael Hennerich , Antoniu Miclaus , Jinjie Ruan , Lorenzo Bianconi , Srinivas Pandruvada , Basavaraj Natikar , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jiri Kosina , Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich , Andy Shevchenko Subject: [PATCH v1 13/22] iio: gyro: hid-sensor-gyro-3d: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:58 +0300 Message-ID: <20240902222824.1145571-14-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240902222824.1145571-1-andy.shevchenko@gmail.com> References: <20240902222824.1145571-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/gyro/hid-sensor-gyro-3d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-s= ensor-gyro-3d.c index 59a38bf9459b..490c325897bd 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c @@ -279,11 +279,11 @@ static int gyro_3d_parse_report(struct platform_devic= e *pdev, /* Function to initialize the processing for usage id */ static int hid_gyro_3d_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev =3D dev_get_platdata(&pdev->dev); int ret =3D 0; static const char *name =3D "gyro_3d"; struct iio_dev *indio_dev; struct gyro_3d_state *gyro_state; - struct hid_sensor_hub_device *hsdev =3D pdev->dev.platform_data; =20 indio_dev =3D devm_iio_device_alloc(&pdev->dev, sizeof(*gyro_state)); if (!indio_dev) @@ -361,7 +361,7 @@ static int hid_gyro_3d_probe(struct platform_device *pd= ev) /* Function to deinitialize the processing for usage id */ static void hid_gyro_3d_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev =3D pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev =3D dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev =3D platform_get_drvdata(pdev); struct gyro_3d_state *gyro_state =3D iio_priv(indio_dev); =20 --=20 2.46.0