From patchwork Mon Sep 2 22:16:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787718 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 5C371187849 for ; Mon, 2 Sep 2024 22:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316118; cv=none; b=AOHNW/Np+Dn4D6K6FJx1RhL+lLRgGaox9lx96F8GPo8e1mfJZrjUkTCdbRqHfzcyep+Nj88ajVKAB8GcXvTV7duxhCSLX7jO8PV7CKg5y4CRdm/Mrklura/of2l0JCzWLdirU4tTkjPPeZsfLQk86lTGB/SgTyNAi3DpvH6oN5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316118; c=relaxed/simple; bh=uSKyNDS6ptkIR0DYYsYfkgq3QP3Bq+QfzQYD1avZxDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LbKNwxWODtpQwjzO6aI8IDw7x7wVO+PXI8JMxtdQJLiatcnZhkheDltGJx9wWjhqRwkx/PBpF7Jm6tv0Y7Mtchj964RlJAX1rCTkR3GZCSrO8x4n4VLDNr0FT4nFk+IRAC67LYFsMQ00zAWZ6T4DWNgQaCBR5i0AhZQm807t0WA= 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.81 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id aca308f4-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:28 +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 01/22] iio: accel: hid-sensor-accel-3d: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:46 +0300 Message-ID: <20240902222824.1145571-2-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/accel/hid-sensor-accel-3d.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index 9b7a73a4c48a..caa183637422 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c @@ -328,6 +328,7 @@ static int accel_3d_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_accel_3d_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret = 0; const char *name; struct iio_dev *indio_dev; @@ -335,8 +336,6 @@ static int hid_accel_3d_probe(struct platform_device *pdev) const struct iio_chan_spec *channel_spec; int channel_size; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; - indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct accel_3d_state)); if (indio_dev == NULL) @@ -424,7 +423,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_accel_3d_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct accel_3d_state *accel_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:16:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787719 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 AC249188005 for ; Mon, 2 Sep 2024 22:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316119; cv=none; b=KDD6t69rakdH2nxyRWyZTM0gJzo2lZAHGdDuNlzhLquwgsGiyqMD3eELiSoxJdbc+E0dFC3+kGznbC//8lHeZSiqfKi8s4brwF3YBjEEOgtapCoSnuH/vDuh8L2LIteFOM9eotckicYXLXM2H7WpyCsZnATT7ERCV0p4Nf57Gmc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316119; c=relaxed/simple; bh=CKDqugtmZkhWcHcoOAEU1fuDv7m3PKG/IDTHg8/GOdU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o5p9cNdYY2tVyw88nXz82EVYkizGkge/GovAxRUsgv1uEUHTWOtfr7/9NiKAkMa8I9GNfb6UM+r7i8StLVe1eqp2DCu+xm5++wLQ7YxnfxznmJKfNLjY3jvsAiGN1T5aa0nR4gLu2X5GNMmsiMDhnxRX2vQ5F7tOp91C/05wHPc= 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.81 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 ad933de5-697a-11ef-abae-005056bdd08f; Tue, 03 Sep 2024 01:28:29 +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 02/22] iio: adc: ad7266: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:47 +0300 Message-ID: <20240902222824.1145571-3-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/adc/ad7266.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c index 7949b076fb87..858c8be2ff1a 100644 --- a/drivers/iio/adc/ad7266.c +++ b/drivers/iio/adc/ad7266.c @@ -383,7 +383,7 @@ static const char * const ad7266_gpio_labels[] = { static int ad7266_probe(struct spi_device *spi) { - struct ad7266_platform_data *pdata = spi->dev.platform_data; + const struct ad7266_platform_data *pdata = dev_get_platdata(&spi->dev); struct iio_dev *indio_dev; struct ad7266_state *st; unsigned int i; From patchwork Mon Sep 2 22:16:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787722 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 06B79187FFA for ; Mon, 2 Sep 2024 22:28:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316132; cv=none; b=HhFscO2/0iJbK3JlC7CADLPkimg8GCIqIRIicpiTeb1kPhpEMWZeoh7jiuO6VzVuIrDhW1x7um3ldsJmd5k0C+l2ydJ61NuAXwA8qHyILhufdcilpULuHT+lcOEg3ie/nGFgsB1AVAqVKR9WsikwPenZ1Gz6c3WJgFPeVqqILbA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316132; c=relaxed/simple; bh=nHbfgrvQy0z0lM6FjGAHDJWcQ2iS9trkZXW+dADx3oY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tAv7iKCplE18hqB4dfo2VY+6x1LjSv4j/S7BVY0gPcvh6lXmf9hoxjqUIZ7urU+5FbhTxvkWO6Uj+UNQzNHlaH/nTqwv7lV6hemwD0bAUYgDuA/yOp74w/GPWJ3QcCXVChheAD1NmBCDZE0o7kFUW79FBfBYmf2gANFPRvKzRv0= 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.81 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id ae7e2ff2-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:30 +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 03/22] iio: adc: ad7791: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:48 +0300 Message-ID: <20240902222824.1145571-4-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/adc/ad7791.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c index 86effe8501b4..5d2ad3dd6caa 100644 --- a/drivers/iio/adc/ad7791.c +++ b/drivers/iio/adc/ad7791.c @@ -371,7 +371,7 @@ static const struct iio_info ad7791_no_filter_info = { }; static int ad7791_setup(struct ad7791_state *st, - struct ad7791_platform_data *pdata) + const struct ad7791_platform_data *pdata) { /* Set to poweron-reset default values */ st->mode = AD7791_MODE_BUFFER; @@ -401,7 +401,7 @@ static void ad7791_reg_disable(void *reg) static int ad7791_probe(struct spi_device *spi) { - struct ad7791_platform_data *pdata = spi->dev.platform_data; + const struct ad7791_platform_data *pdata = dev_get_platdata(&spi->dev); struct iio_dev *indio_dev; struct ad7791_state *st; int ret; From patchwork Mon Sep 2 22:16:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787723 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 C15F0187FE3 for ; Mon, 2 Sep 2024 22:28:53 +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=1725316135; cv=none; b=aZUsvTdjOP+xE21HenLGR3RpkJidenoj+PjHGD8wfVrASeC0e7UjfN7Qv60gYxRlwQAkPvrzz8lS84o1GJRn31xYrFxN8TLW3FIF0pzARGcW3vN74+bCAan7yjk0CU+bu+gMi/NCcmLt9POvg4suF0GO8HKHL5rNot/ehzvigp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316135; c=relaxed/simple; bh=T/CgH+qXQHoXnPD9XO3eOWuwN2VpZYAO5w82WXns/1c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gAOnCJh1ZjLjN8B8kymjIlu5GtFR4z5/xVWbP03SrdKiZ9lt/+C+vFp1U4nZOY7tG9rq0EdbGgiajo4Xm2EZm+2X5HdViRRF37NvTdZooX9cg3FPScpP4QskJtjYkWPDprbJw0l9+vjcduQcNKMchb3BhHKL/pcxY9Xc4866+3I= 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 aee633f9-697a-11ef-abae-005056bdd08f; Tue, 03 Sep 2024 01:28:31 +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 04/22] iio: adc: ad7887: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:49 +0300 Message-ID: <20240902222824.1145571-5-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/adc/ad7887.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c index 6265ce7df703..b301da9b88b1 100644 --- a/drivers/iio/adc/ad7887.c +++ b/drivers/iio/adc/ad7887.c @@ -234,7 +234,7 @@ static void ad7887_reg_disable(void *data) static int ad7887_probe(struct spi_device *spi) { - struct ad7887_platform_data *pdata = spi->dev.platform_data; + const struct ad7887_platform_data *pdata = dev_get_platdata(&spi->dev); struct ad7887_state *st; struct iio_dev *indio_dev; uint8_t mode; From patchwork Mon Sep 2 22:16:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787730 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 A155318953E for ; Mon, 2 Sep 2024 22:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316153; cv=none; b=rtaff2Wg9+lbzvrD9XJVg2QXTV8c4NvC9FxpZTlijM4W2WgDnTLNvLvD6ssXQxbQucRCDpt2kZ/VOoDfCP/9UzLKtie3SZk/eS6pvN9ZTIudEpiVVKYU1/C9ATind8w8+E+mpFm7j5craO4xMpZUfiBGYnVxc/BWJTuJ/OWpd8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316153; c=relaxed/simple; bh=TJVJWUgFroHz4D1KAqxrh0hBNP9FzfldUPa3LBUsFjI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PrcUqSNE2tiB4ksfMy4whjBbU1L0hEsj996AcMY+KqrxsyVMhCtXXgNc5Hj1UqS24pgh1lt3KKdORRRYCNX9MyNhRFYlr0QGo63V+8s8jRTyGZW6o9X00V6hVzujeIbWlAwFrMrXh5i+ZDw4EdAODMe6nKEsZnMShlRzE1Z2Jes= 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.81 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 fgw22.mail.saunalahti.fi (Halon) with ESMTP id af57ce29-697a-11ef-8ecb-005056bdf889; Tue, 03 Sep 2024 01:28:32 +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 05/22] iio: adc: ad7793: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:50 +0300 Message-ID: <20240902222824.1145571-6-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/adc/ad7793.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c index abebd519cafa..b86e89370e0d 100644 --- a/drivers/iio/adc/ad7793.c +++ b/drivers/iio/adc/ad7793.c @@ -770,7 +770,7 @@ static const struct ad7793_chip_info ad7793_chip_info_tbl[] = { static int ad7793_probe(struct spi_device *spi) { - const struct ad7793_platform_data *pdata = spi->dev.platform_data; + const struct ad7793_platform_data *pdata = dev_get_platdata(&spi->dev); struct ad7793_state *st; struct iio_dev *indio_dev; int ret, vref_mv = 0; From patchwork Mon Sep 2 22:16:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787732 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 E3E8018BB88 for ; Mon, 2 Sep 2024 22:29:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316156; cv=none; b=bMR/71CZQDEU7ZyJ7cOXjLM5Cie1aemPNAwqjYSwA/RFDXTfUkPaSXPbYaHPyr2uH9wSbplk7p57RkjQUOuyY6al8mcukUC/WMevCShdaEzRoHoWSDO2+J5s3vZK0wz6aKGvBgNicvmoefPoimWdFsv1xCorMi/hs29LZwn87mE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316156; c=relaxed/simple; bh=JbN8T71a/PZKhOL1QNhERt7e8cyfCWMB8Ep8u0D95s4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mETR9DZQ0faCUY9j+VxtBVwz+1A1L/DbvQJccKcnQz+oTn0f0LMTfg1l8rFKE7NHd4xZeBVF1WXhn2Q7+a6xuxhosYUvEg8Bb92HhKWr/yGxnDPzwPIZJRFu7dXEL3Llq+3g8YiD67w9ftxaEX+5KbKVusFQWLxkzu4O/4mhdd4= 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.82 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id aff40cbd-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:33 +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 06/22] iio: adc: ltc2497: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:51 +0300 Message-ID: <20240902222824.1145571-7-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. While at it, drop duplicate NULL check that iio_map_array_register() already has. Signed-off-by: Andy Shevchenko --- drivers/iio/adc/ltc2497-core.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/iio/adc/ltc2497-core.c b/drivers/iio/adc/ltc2497-core.c index 996f6cbbed3c..ad8ddf80310e 100644 --- a/drivers/iio/adc/ltc2497-core.c +++ b/drivers/iio/adc/ltc2497-core.c @@ -168,6 +168,7 @@ static const struct iio_info ltc2497core_info = { int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev) { struct ltc2497core_driverdata *ddata = iio_priv(indio_dev); + struct iio_map *plat_data = dev_get_platdata(dev); int ret; /* @@ -200,16 +201,10 @@ int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev) return ret; } - if (dev->platform_data) { - struct iio_map *plat_data; - - plat_data = (struct iio_map *)dev->platform_data; - - ret = iio_map_array_register(indio_dev, plat_data); - if (ret) { - dev_err(&indio_dev->dev, "iio map err: %d\n", ret); - goto err_regulator_disable; - } + ret = iio_map_array_register(indio_dev, plat_data); + if (ret) { + dev_err(&indio_dev->dev, "iio map err: %d\n", ret); + goto err_regulator_disable; } ddata->addr_prev = LTC2497_CONFIG_DEFAULT; From patchwork Mon Sep 2 22:16:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787736 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 0577718CC15 for ; Mon, 2 Sep 2024 22:29:34 +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=1725316176; cv=none; b=XNjDX/y8LS2T3s7Tg7pwfOjYKlMUAI7bLLomE8YhqRVBFTztdh7hpad4w7CKbgD+sl1nR2qu/DLk13BtPQZ+wG2V27WKjrZZ7HEo7yZYgdMADMPTSfpvCLQodgRLYACreqGNS/jKVygMcUo4IHOTjlwW4wwJPKoZISv/EQwwXKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316176; c=relaxed/simple; bh=bCouMPCfZo5pf56gbl+7wP0aa2XkCRIomN3pfQ0D6fw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EyG+8lCe+UvPP3gikolSB0T0kxtu2HxmMexi6215dcnCEYDa8leXOkVRXO6nuVai74SsuXxH48tz/U8zj4ScrAOuo+I+IL2X7CGsfC1nrpqxVzHJ2FJIJNCsj/LsYOvZIyJygSKc1s8ndOun+zUKDhl4BDMt4nXAhVpcF424g0c= 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id b05ac0f2-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:33 +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 07/22] iio: dac: ad5504: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:52 +0300 Message-ID: <20240902222824.1145571-8-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c index e6c5be728bb2..305cd58cd257 100644 --- a/drivers/iio/dac/ad5504.c +++ b/drivers/iio/dac/ad5504.c @@ -270,7 +270,7 @@ static const struct iio_chan_spec ad5504_channels[] = { static int ad5504_probe(struct spi_device *spi) { - struct ad5504_platform_data *pdata = spi->dev.platform_data; + const struct ad5504_platform_data *pdata = dev_get_platdata(&spi->dev); struct iio_dev *indio_dev; struct ad5504_state *st; struct regulator *reg; From patchwork Mon Sep 2 22:16:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787724 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (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 B89C518893B for ; Mon, 2 Sep 2024 22:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316139; cv=none; b=gXWCb8X2mlWzFu9/WsHVCWqsYpEH5mu43pCN4OSpGYw8DG5knsh8nzhW0219mJqa18z25Viky/+OfCkRboW9ZEMHXKrVLM8ZUVpkwuhlYWkPolz4ZPYjeXH6jdBEh7D35hMJvJPMxPCxicbVbAT0GgdIQdREhU/v7qipG4A4ZzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316139; c=relaxed/simple; bh=6s0/uK8OpJ0JPPuTa8tnsMtjG6IVSRGiOMZJleFz5mc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OPjeWmb2zz/QORET0hNlyx6sv2jdK/fe0q07JG9rkY2BtT4TMo4BcayHGmrn90fFHapAjSWylWQEOBPHbc0ZEeywret4krdv6QRyM4lXuKA65BlbskhNLEjAiVvx8PeACkn5dJUjRyBKpVa7wF7PPOP3fFewk8KIhCsJuWySSxY= 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.84 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id b0c0841e-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:34 +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 08/22] iio: dac: ad5791: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:53 +0300 Message-ID: <20240902222824.1145571-9-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/dac/ad5791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c index 75b549827e15..553431bf0232 100644 --- a/drivers/iio/dac/ad5791.c +++ b/drivers/iio/dac/ad5791.c @@ -341,7 +341,7 @@ static const struct iio_info ad5791_info = { static int ad5791_probe(struct spi_device *spi) { - struct ad5791_platform_data *pdata = spi->dev.platform_data; + const struct ad5791_platform_data *pdata = dev_get_platdata(&spi->dev); struct iio_dev *indio_dev; struct ad5791_state *st; int ret, pos_voltage_uv = 0, neg_voltage_uv = 0; From patchwork Mon Sep 2 22:16:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787733 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (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 A4E52187877 for ; Mon, 2 Sep 2024 22:29:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316158; cv=none; b=K2X9C3t5uCfbYzS3gYCu2cZFV9PUHZgUz2FueRUYIHOT28lHbFI0nQxjTPLpwcr8OHiksCAeRS+DLi4p9NJdGROl0OkWlyt9GH178T619K8uoYhxjnSJtgXgq2cT2jgtPbeIcCAGUh1DCTCRRCIxt1hFxojII5N520NjC58WlY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316158; c=relaxed/simple; bh=IexbYayyC/SvK2mi1ITqMIUsEbQ0bFiYfoYDnybmghM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DpThRi7cLWotw3UvJF5XCvSvvqrg7W6xjfUZVdTL0MoMYZtlnQMp67bqD06SU8YX/yZdI8VR4N5xPQkc4VDSmA+YbKiRBtgRV8Yj2zGiXNFKISomCE1W+Eu4J0EQdjBtzucsRVEybVo6wwT/J6RdvuQfA2tRKBOhBilMZ9jY3G8= 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.84 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 b12d1bde-697a-11ef-abae-005056bdd08f; Tue, 03 Sep 2024 01:28:35 +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 09/22] iio: dac: m62332: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:54 +0300 Message-ID: <20240902222824.1145571-10-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/dac/m62332.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/m62332.c b/drivers/iio/dac/m62332.c index ae53baccec91..3497513854d7 100644 --- a/drivers/iio/dac/m62332.c +++ b/drivers/iio/dac/m62332.c @@ -201,7 +201,7 @@ static int m62332_probe(struct i2c_client *client) indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->info = &m62332_info; - ret = iio_map_array_register(indio_dev, client->dev.platform_data); + ret = iio_map_array_register(indio_dev, dev_get_platdata(&client->dev)); if (ret < 0) return ret; From patchwork Mon Sep 2 22:16:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787721 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 D3E911714CF for ; Mon, 2 Sep 2024 22:28:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316132; cv=none; b=JVW3KwZ0wK3DuYUkf5zCq7WU1Ajv0CtsrOhLHgaL4n2Fyol3qxW0CGUfa/5pcJrE6MMF2oHByqTolh2eGBMRsOc6GOUPimHUp7Rrkoy3gMyDw53ikhzTd5zg0cgJxVvrPfx4FEFqbjjr+MVsV8aOIxAb571/9yhk84G2EvoRM6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316132; c=relaxed/simple; bh=QWPgIRpwXymjEgzsDh0vqG0Bdp+osf8cuQX3gO2Y+Z8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jr8Y5k/4n51xDy2oV3hgOw7/PO2THkTnnyFsEHi7qgtBg/0jmCmeH2olmPsfPBcblZjOkYlmu5qRL+nSRt6m0WiGX7dCm1YUDClhh9egjlJir5YUrRR7vPyq0tcD/2u6uIGlVjiWqkYmey1wB3trc17b8VC0zVae1SoUbKKjCzU= 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.82 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 fgw22.mail.saunalahti.fi (Halon) with ESMTP id b1ab8451-697a-11ef-8ecb-005056bdf889; Tue, 03 Sep 2024 01:28:36 +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 10/22] iio: dac: max517: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:55 +0300 Message-ID: <20240902222824.1145571-11-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/dac/max517.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index 685980184d3c..96781ae04f9d 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c @@ -143,10 +143,10 @@ static const struct iio_chan_spec max517_channels[] = { static int max517_probe(struct i2c_client *client) { + const struct max517_platform_data *platform_data = dev_get_platdata(&client->dev); const struct i2c_device_id *id = i2c_client_get_device_id(client); struct max517_data *data; struct iio_dev *indio_dev; - struct max517_platform_data *platform_data = client->dev.platform_data; int chan; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); @@ -176,7 +176,7 @@ static int max517_probe(struct i2c_client *client) /* * Reference voltage on MAX518 and default is 5V, else take vref_mv - * from platform_data + * from platform_data. */ for (chan = 0; chan < indio_dev->num_channels; chan++) { if (id->driver_data == ID_MAX518 || !platform_data) From patchwork Mon Sep 2 22:16:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787727 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 AA899187866 for ; Mon, 2 Sep 2024 22:29:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316145; cv=none; b=oPxqXbbzif6EZZbPRp1cYutZwvvkG5XZKbayGztXtUDotEVeQpk+N6x1s+gYrByGIxAaAdGPCeBcs8sczcDZ3b439V2yvXXCNH1tJcbH82+GI2GXn/8H9dxPV0i/NBhnzSzUIVXh+Dhd6cOr8M9XwQv3+nUSatGp1bCwm7bGbhI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316145; c=relaxed/simple; bh=U5tPKRhx3B0vC940BTl3CGTtxTUpWANOirSrm2oN9OE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s4oyes5DLiCCjvzkVPhMmRQQ7i/v5q2/WzDcGyqPk4xWuHZitLSgp/raWzrisKZyArFnp3GIGsAeN3UqU1Q/V/+I3pQtzmAsCeHshevJfobnzDHcbF5yiHxfdnTJD7xUtVBIkXfcTgWz8LaBsaPIrDuo/NEc3ih/QmeBoGW9kqw= 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.81 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 b217dbe4-697a-11ef-abae-005056bdd08f; Tue, 03 Sep 2024 01:28:36 +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 11/22] iio: frequency: ad9523: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:56 +0300 Message-ID: <20240902222824.1145571-12-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/frequency/ad9523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index b391c6e27ab0..b1554ced7a26 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c @@ -970,7 +970,7 @@ static int ad9523_setup(struct iio_dev *indio_dev) static int ad9523_probe(struct spi_device *spi) { - struct ad9523_platform_data *pdata = spi->dev.platform_data; + struct ad9523_platform_data *pdata = dev_get_platdata(&spi->dev); struct iio_dev *indio_dev; struct ad9523_state *st; int ret; From patchwork Mon Sep 2 22:16:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787729 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 4BA401885A3 for ; Mon, 2 Sep 2024 22:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316149; cv=none; b=hnM48kTz2+djr2rY3MLxjhFmUDAQyxtmkE2yxU15RcGvXu9GtKrNq+l67KgFzXGWBJgn6aAL7FIUoDuj1uLqdz5NkUmH3XYJSdwTYuYdHX8UszPV1QeeWWsjhiTJsN+OePcjaop5YZawLTycD8IF5l4f1YokW4OSVwCt64wdyIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316149; c=relaxed/simple; bh=Si0/H2gUZIrbXyiSDxnyLN7gSZnhZ28PRqd1ubbwWh8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WYhHHAlh3EcBzmh7m6SyHbNd8urQI+ItL5X/9KLca/+uhDSYrBKNNU5TUBxW6qyQ0cGn9+h0IittCWUEmu1PIo3qFSwkDt4ZMlP3bYiZhXDb0Zr8kXimxG6r4o8B2FvtUB0wK7qQbDAHk6hCPRH67oplueU4bLwUUSzZXpnetYk= 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.82 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 fgw22.mail.saunalahti.fi (Halon) with ESMTP id b2941a14-697a-11ef-8ecb-005056bdf889; Tue, 03 Sep 2024 01:28:37 +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 12/22] iio: frequency: adf4350: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:57 +0300 Message-ID: <20240902222824.1145571-13-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/frequency/adf4350.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index e13e64a5164c..61828e61e275 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -603,7 +603,7 @@ static int adf4350_probe(struct spi_device *spi) if (pdata == NULL) return -EINVAL; } else { - pdata = spi->dev.platform_data; + pdata = dev_get_platdata(&spi->dev); } if (!pdata) { From patchwork Mon Sep 2 22:16:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787734 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 16C5C188906 for ; Mon, 2 Sep 2024 22:29:19 +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=1725316161; cv=none; b=sSypjTaqiaIrok8r9spOKnvZmpiAIszrvB3JzMxFWGLMgxEUq7UOg/ZmY1m0fbCiC8TYf2f4HnXTYJ3RJO5/U8q+5fLLcbH0LviDX5YZuiIpX0irphSRmyAQPFlvSHWW5ovKzJ88Y18poihO7tn1C+XF13AQE+yEX1stTYvhK6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316161; c=relaxed/simple; bh=3dUeMEczuVrufl8SGQjkyOoqnQqLp4XWk+aY6v1VujM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iw5FAUzjIqOhoBHpNZTl5yU3H0VVFrcx5qjK0uO0ylOQ19HpOYoc6EGM5LceGu5q1qs/jZDlrhWzfBDwYUaKZ6ZHl//dkUReL87PYC7XNBp97X2qhCo/OP6G10UjPuHiWFr9qDLREPeFkBOgvHhv/3vGhjFjEadCh1ec0iTZ1Cw= 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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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-sensor-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_device *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 = dev_get_platdata(&pdev->dev); int ret = 0; static const char *name = "gyro_3d"; struct iio_dev *indio_dev; struct gyro_3d_state *gyro_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; indio_dev = 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 *pdev) /* Function to deinitialize the processing for usage id */ static void hid_gyro_3d_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct gyro_3d_state *gyro_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:16:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787725 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (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 23E93188593 for ; Mon, 2 Sep 2024 22:29:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316142; cv=none; b=NWo+tM3NgqLuao3C6MMtm4Tbc26lLzwuoxMDqhVb/3krx8Zep7TYf5KsxzuELjrme76Q5ddr3LShVriRToZXt1fU2+8/khFb20nw2OKZciclZDuOXlBaLoxNMLkLNir6YeS+WTxsWaiXey58dBkdylIYFDc8N3qh6Z/BT1X6GyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316142; c=relaxed/simple; bh=rz4cPLPk4U/N9gxi84pXdf1L9hx4wLHD3D5UxEPPbnc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nUMHvaAHXynng/sOFUtZzPeCgWCSkdtKrI1JDn2rUsZcXQIME4XmCnwfXyQLVQzvs96q39dZO2jZ99ZUDCVHuoxxVgL00QJGXfgYwjIYdWyn2FMKSKV6rJI9iIPTybyIVX3R2rAVEieeyfDrQS2UU7RGb2J27IR7GTMg70bR9zc= 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.84 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id b3ad4428-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:39 +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 14/22] iio: imu: st_lsm6dsx: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:59 +0300 Message-ID: <20240902222824.1145571-15-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index ed0267929725..3958b5e1a3f6 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -2132,14 +2132,11 @@ st_lsm6dsx_get_drdy_reg(struct st_lsm6dsx_hw *hw, const struct st_lsm6dsx_reg **drdy_reg) { struct device *dev = hw->dev; + const struct st_sensors_platform_data *pdata = dev_get_platdata(dev); int err = 0, drdy_pin; - if (device_property_read_u32(dev, "st,drdy-int-pin", &drdy_pin) < 0) { - struct st_sensors_platform_data *pdata; - - pdata = (struct st_sensors_platform_data *)dev->platform_data; + if (device_property_read_u32(dev, "st,drdy-int-pin", &drdy_pin) < 0) drdy_pin = pdata ? pdata->drdy_int_pin : 1; - } switch (drdy_pin) { case 1: @@ -2162,14 +2159,13 @@ st_lsm6dsx_get_drdy_reg(struct st_lsm6dsx_hw *hw, static int st_lsm6dsx_init_shub(struct st_lsm6dsx_hw *hw) { const struct st_lsm6dsx_shub_settings *hub_settings; - struct st_sensors_platform_data *pdata; struct device *dev = hw->dev; + const struct st_sensors_platform_data *pdata = dev_get_platdata(dev); unsigned int data; int err = 0; hub_settings = &hw->settings->shub_settings; - pdata = (struct st_sensors_platform_data *)dev->platform_data; if (device_property_read_bool(dev, "st,pullups") || (pdata && pdata->pullups)) { if (hub_settings->pullup_en.sec_page) { @@ -2524,9 +2520,9 @@ static irqreturn_t st_lsm6dsx_sw_trigger_handler_thread(int irq, static int st_lsm6dsx_irq_setup(struct st_lsm6dsx_hw *hw) { - struct st_sensors_platform_data *pdata; const struct st_lsm6dsx_reg *reg; struct device *dev = hw->dev; + const struct st_sensors_platform_data *pdata = dev_get_platdata(dev); unsigned long irq_type; bool irq_active_low; int err; @@ -2554,7 +2550,6 @@ static int st_lsm6dsx_irq_setup(struct st_lsm6dsx_hw *hw) if (err < 0) return err; - pdata = (struct st_sensors_platform_data *)dev->platform_data; if (device_property_read_bool(dev, "drive-open-drain") || (pdata && pdata->open_drain)) { reg = &hw->settings->irq_config.od; @@ -2639,7 +2634,7 @@ static int st_lsm6dsx_init_regulators(struct device *dev) int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id, struct regmap *regmap) { - struct st_sensors_platform_data *pdata = dev->platform_data; + const struct st_sensors_platform_data *pdata = dev_get_platdata(dev); const struct st_lsm6dsx_shub_settings *hub_settings; struct st_lsm6dsx_hw *hw; const char *name = NULL; From patchwork Mon Sep 2 22:17:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787728 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 641FD188596 for ; Mon, 2 Sep 2024 22:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316145; cv=none; b=hPebuHWjvjTmCf/mBrf4pDWhyiJC8P0SeizmGjX7GDsOKujvITZ6f2wRit62RXfAFHApM4MTIjAo6Tg+Em2bPe2NIb7AjI1swM9ZUTw0wa1lGnYAAo58ddZYIgclPaSqXRvv1Du8I6IM6T8VgKC6IfeC4ZX87cEHXZ9yAD8qiBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316145; c=relaxed/simple; bh=eMaJ1XGIgYbncwGBJDENIO5v1xzNDJoTgR/7qtZXcTA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tMVP8HUi18W7+1Dexv66KHxginrDPmOAT20Jm1YOluAGU/7u5q4a1q6JrJImvbH/LNdbvuOlwpHQau3vwhzbP4M/z+yXvJBr/X6+Y1DKCmJN2Y3l/xQLLV+T19SRF59wUngl2iOED/OTFPKKaytbOloyGYyGLTqeGGJmvjjW5j8= 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.82 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 fgw23.mail.saunalahti.fi (Halon) with ESMTP id b40d7383-697a-11ef-8256-005056bdfda7; Tue, 03 Sep 2024 01:28:40 +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 15/22] iio: light: hid-sensor-als: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:00 +0300 Message-ID: <20240902222824.1145571-16-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/light/hid-sensor-als.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index 260281194f61..0d995bc7877e 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c @@ -356,11 +356,11 @@ static int als_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_als_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret = 0; static const char *name = "als"; struct iio_dev *indio_dev; struct als_state *als_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct als_state)); if (!indio_dev) @@ -438,7 +438,7 @@ static int hid_als_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_als_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct als_state *als_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:17:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787726 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 4916F18893A for ; Mon, 2 Sep 2024 22:29:00 +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=1725316142; cv=none; b=dG2UwMXnDIrH3ezvtqiJ6cz+yoz0U3UYwfh6ybld74bkq1ztiXYuR80iiKpsspOgLSIvb2hAPhdJ5hnhL/1ndcvPIstyURba6GltmRT8MEesHJ9pUwf9U3wsANUltY+LT3DjJ0ZO4CSsdsggfurZW/lFF286STzrDFlq7eqCgXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316142; c=relaxed/simple; bh=na8Ih3U30oMUt4tlFrC4bjWSAbvwr6i7Vjw2ATFC8Pk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Td+ZLweDqDg1iIBPlcCvFYX0b/rY87ODd0U+BqWnOh4X10mh7LGiu7n/S5rBmdnAf3VLI18w9eef6SyZjXRDDJeuYL4GMrFA9satlEhD4ZRa0dAKYtNL5v1v32fMHl+JgIykzV2AKim2a5mGN7YCz99IXyv4NWwuNW2QCB2i6Mw= 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 fgw22.mail.saunalahti.fi (Halon) with ESMTP id b478b24d-697a-11ef-8ecb-005056bdf889; Tue, 03 Sep 2024 01:28:40 +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 16/22] iio: light: hid-sensor-prox: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:01 +0300 Message-ID: <20240902222824.1145571-17-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/light/hid-sensor-prox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c index 26c481d2998c..5343ebd404bf 100644 --- a/drivers/iio/light/hid-sensor-prox.c +++ b/drivers/iio/light/hid-sensor-prox.c @@ -233,11 +233,11 @@ static int prox_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_prox_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret = 0; static const char *name = "prox"; struct iio_dev *indio_dev; struct prox_state *prox_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct prox_state)); @@ -315,7 +315,7 @@ static int hid_prox_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_prox_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct prox_state *prox_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:17:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787731 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (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 3006B18B48E for ; Mon, 2 Sep 2024 22:29:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316155; cv=none; b=KRDhC8C/4KN+oV38XoPplSOBk0BhJ4sJ97YOCV7YpH3tfn8/hZIpZjZv8EhRbvyhsiiRtW7cXA7zBmiEi9SD2a6BUOcRbHzLcHLn50ErCbVbtELe1zO8G30HIEc4DUs0NmMyYLlLVcUGWxHj5r2DABPBoJiuXxXEXQaR5eYY8KU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316155; c=relaxed/simple; bh=Uy3gw0baEyg93YMzdsYyOhpSjIuIj+PESe4MBDgyQns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kBR92GS4hp/J9ixobaa1TiZQqqKe6s/bbPE4hgAcGREejAyr22LGJwaGNygRdxIMipWR5eOfFZD4jYLYFFy+/cPxWPsf7G+fkk0Diy/g3VamVdaCaWEu9fcIzab3aq6ydb9yEqP5iETXZ/hpO0S9JRYXKRLBqWaiw2YYdite3XQ= 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.84 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 fgw23.mail.saunalahti.fi (Halon) with ESMTP id b4efba77-697a-11ef-8256-005056bdfda7; Tue, 03 Sep 2024 01:28:41 +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 17/22] iio: light: lm3533-als: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:02 +0300 Message-ID: <20240902222824.1145571-18-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko Reviewed-by: Johan Hovold --- drivers/iio/light/lm3533-als.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c index 7800f7fa51b7..6429d951ce7f 100644 --- a/drivers/iio/light/lm3533-als.c +++ b/drivers/iio/light/lm3533-als.c @@ -754,7 +754,7 @@ static int lm3533_als_set_resistor(struct lm3533_als *als, u8 val) } static int lm3533_als_setup(struct lm3533_als *als, - struct lm3533_als_platform_data *pdata) + const struct lm3533_als_platform_data *pdata) { int ret; @@ -828,8 +828,8 @@ static const struct iio_info lm3533_als_info = { static int lm3533_als_probe(struct platform_device *pdev) { + const struct lm3533_als_platform_data *pdata; struct lm3533 *lm3533; - struct lm3533_als_platform_data *pdata; struct lm3533_als *als; struct iio_dev *indio_dev; int ret; @@ -838,7 +838,7 @@ static int lm3533_als_probe(struct platform_device *pdev) if (!lm3533) return -EINVAL; - pdata = pdev->dev.platform_data; + pdata = dev_get_platdata(&pdev->dev); if (!pdata) { dev_err(&pdev->dev, "no platform data\n"); return -EINVAL; From patchwork Mon Sep 2 22:17:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787737 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 8326C18E03D for ; Mon, 2 Sep 2024 22:29:43 +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=1725316184; cv=none; b=hgyH9NYIjJKj9xpQJMEPZTighjkedjRzBnLEccQYwBPjNYm1mfj5OznPp6k5jf4zsAFQD9F4Rd/kTWVe8kmrAozkwnV3yhEvjhsceAXVjAfKSQayAmi0ykvpnr4TJ2tpGBq47d8E6WDeNgLoGnSzAy5yGR7pGzf9CLWxftMR3UY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316184; c=relaxed/simple; bh=VPi5go2UZSyYcoqWpNRAu5quJSpMf/nZhR31FMIQHoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C2WnHTtaP++tHnFVeaqHDPfDukeFdarb7eMle3NLPfmL1F64rzmRnsO3lc1QgdKSF//HaSCwJvahZ2qiLZ7swhg7W2FS3Kd8zaaUrNy/0Q3cNpfmTF1Atkv7CRGC8b1ywLW0D+ierGnhtYRWMEL7WRPv1sCYpYh8dOlyGbvqYEU= 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 b563aa78-697a-11ef-abae-005056bdd08f; Tue, 03 Sep 2024 01:28:42 +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 18/22] iio: magnetometer: hid-sensor-magn-3d: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:03 +0300 Message-ID: <20240902222824.1145571-19-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 5c795a430d09..ae10db87d1e1 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -466,11 +466,11 @@ static int magn_3d_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_magn_3d_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret = 0; static char *name = "magn_3d"; struct iio_dev *indio_dev; struct magn_3d_state *magn_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; struct iio_chan_spec *channels; int chan_count = 0; @@ -549,7 +549,7 @@ static int hid_magn_3d_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_magn_3d_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct magn_3d_state *magn_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:17:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787738 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 6A4E118FC91 for ; Mon, 2 Sep 2024 22:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316189; cv=none; b=bpEoGvVtkzmaFP25SCXrkKQmfmxfg4NS4PBm8EDxYY+IPA9ETl8dzOYd7iLT+VPjsHhLI5glMyG7fMKyaEKPtLCcn6zHQchnHO+96Uihnp7nXiybSmIBR0kUDBpIiVaF2UehbibH990ayg7RQFdiMcpQ8ULt4oHoVz8VXs1Da/I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316189; c=relaxed/simple; bh=Ul7D5wVVmqAMqo0mpEDHlr0YAPA1NGYKbyJmDz49LVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m2gvlNFYg5SmOGV3k6Knw6Y4t7dsRrKrqIHr0XksDmA+pVZsoWcwKevxG9mNCNm3PuuqOBIhAMY6oLDEKD/dzv/JO84DgjcTuCbeD275i+VvQ8wk2XjiuSW2n3NMC/oZrYndiptmW4HWwBUGhTXAGzB2VHYDXKTzkw7B5FitrIg= 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.82 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id b60e9e8e-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:44 +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 19/22] iio: orientation: hid-sensor-incl-3d: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:04 +0300 Message-ID: <20240902222824.1145571-20-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/orientation/hid-sensor-incl-3d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/orientation/hid-sensor-incl-3d.c b/drivers/iio/orientation/hid-sensor-incl-3d.c index 8943d5c78bc0..21664563b565 100644 --- a/drivers/iio/orientation/hid-sensor-incl-3d.c +++ b/drivers/iio/orientation/hid-sensor-incl-3d.c @@ -299,11 +299,11 @@ static int incl_3d_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_incl_3d_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret; static char *name = "incli_3d"; struct iio_dev *indio_dev; struct incl_3d_state *incl_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct incl_3d_state)); @@ -385,7 +385,7 @@ static int hid_incl_3d_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_incl_3d_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct incl_3d_state *incl_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:17:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787740 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 02F861A4E8A for ; Mon, 2 Sep 2024 22:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316209; cv=none; b=smOtV1+oMMWAh25m4rOUPQy/tAQ+Obi+lpqhksnx2TtgYiOKTRkL+wzDYy32kbDwCZkuqAbctIhKdp1P3PhHeNuUc/LMzBlgcemnNeuZUe9+xKSnXkYw/2Q4Oi91EjPQcJaSGB9f2IWPDAOHs9NIg/B13XLGY7++XDa18pLNhjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316209; c=relaxed/simple; bh=wVFOFwNG96ZS5JTknDbiM35iEs7p1s20pBFB9wSWHWs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a4pDAtckH+hZFuCRf7razsnTrXP8IUM85b0mTXMjss8ES/l4RCDP91Nye+XZDC81g6yUMLN7//qEmWcOX2woxxm7xqJSfNspldyVXWIZlG0/GwdJnlBlIFRsB8DaBlOm/JBHRmLsRAwqd+YLXAwOJXsW58ebBXrFu/9wD5lCIWI= 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.82 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id b6db18c5-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:45 +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 20/22] iio: orientation: hid-sensor-rotation: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:05 +0300 Message-ID: <20240902222824.1145571-21-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/orientation/hid-sensor-rotation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c index 5e8cadd5177a..107adadf7711 100644 --- a/drivers/iio/orientation/hid-sensor-rotation.c +++ b/drivers/iio/orientation/hid-sensor-rotation.c @@ -230,11 +230,11 @@ static int dev_rot_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_dev_rot_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret; char *name; struct iio_dev *indio_dev; struct dev_rot_state *rot_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct dev_rot_state)); @@ -329,7 +329,7 @@ static int hid_dev_rot_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_dev_rot_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct dev_rot_state *rot_state = iio_priv(indio_dev); From patchwork Mon Sep 2 22:17:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787735 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 B4E5918BB85 for ; Mon, 2 Sep 2024 22:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316163; cv=none; b=hesE19jfeHaj0fSvzxi6BNxoaN2x+gZBvMmHUCu/OFAlw8psY1q1x7hqprcTxCOtpyE9JEbduFnK/a30LJ5R2EKdEoKE3IHohPvE2UzMBiKWawKqR9RTN79JHaA/CeqRB5AZ+mjIkMHbiDXaMCaf5tND3dZqIp4IJTDJbnzsf0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316163; c=relaxed/simple; bh=q2W2x5oyaNvC8UUAdV6wNNKiWrB5DlPCM9Iu48dwc60=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KugJ1Vs9/X89HP9Da2a2Dc3tW4GofZGZw8MQ1A1Pz0wpSuzSkoWt+yZ69DOR0pf2LjJSE62wzo/I6G0x3Zg5bwiEqHBbX1Nai2kEh3EyY8+l5Lp7blF5E1R1vAtmHVFOr+Fosw9ZSk4Pf7u7sIgfBdVZ4R3PuMjzIoEMuumYnH4= 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.82 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 fgw22.mail.saunalahti.fi (Halon) with ESMTP id b77fda6b-697a-11ef-8ecb-005056bdf889; Tue, 03 Sep 2024 01:28:45 +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 21/22] iio: position: hid-sensor-custom-intel-hinge: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:06 +0300 Message-ID: <20240902222824.1145571-22-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/position/hid-sensor-custom-intel-hinge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/position/hid-sensor-custom-intel-hinge.c b/drivers/iio/position/hid-sensor-custom-intel-hinge.c index 76e173850a35..63a9f2fcada7 100644 --- a/drivers/iio/position/hid-sensor-custom-intel-hinge.c +++ b/drivers/iio/position/hid-sensor-custom-intel-hinge.c @@ -263,9 +263,9 @@ static int hinge_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_hinge_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct hinge_state *st; struct iio_dev *indio_dev; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; int ret; int i; @@ -344,7 +344,7 @@ static int hid_hinge_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_hinge_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct hinge_state *st = iio_priv(indio_dev); From patchwork Mon Sep 2 22:17:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787739 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 B2DE4188A1F for ; Mon, 2 Sep 2024 22:30:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316206; cv=none; b=Qc57DDaWOYM8BDeBc2dxS7mGg1BJQqBf/+BKRDBoI15ArohAhKlfurlxUfGPQhJq9MeWVOxjZmTZ0cgsMvQpdknOYJRUdIt6r8KvN51I+itCjyH0H48L00p1P5vy9H4OymGS2UVxtm5C6S3W57w1YSdgUKNAlXb+szzxXBTfIyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316206; c=relaxed/simple; bh=Axn5OvqB+CcBxhl3sti9L7ZitYsHqJrWtIcCua+j95g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ee/IGAF9Hy+ep8qjucYNobpSe22jihZ+CML7nci4BvaOvSvBc44UyceaAGrNBLkhoTS6kzB+99dDtEOt+ET8cTWs1qvRU2ZuEOyYgAroEkPy8nmemkjGPMP8/dDV5X7UxSY7JraT7qZ0d3HoOnUuntfCaQ72Fy5hTKCFQQYn8L4= 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.81 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id b7e48c59-697a-11ef-8e8a-005056bd6ce9; Tue, 03 Sep 2024 01:28:46 +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 22/22] iio: pressure: hid-sensor-press: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:17:07 +0300 Message-ID: <20240902222824.1145571-23-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-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/pressure/hid-sensor-press.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c index 956045e2db29..b7e9a085f0cc 100644 --- a/drivers/iio/pressure/hid-sensor-press.c +++ b/drivers/iio/pressure/hid-sensor-press.c @@ -241,11 +241,11 @@ static int press_parse_report(struct platform_device *pdev, /* Function to initialize the processing for usage id */ static int hid_press_probe(struct platform_device *pdev) { + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); int ret = 0; static const char *name = "press"; struct iio_dev *indio_dev; struct press_state *press_state; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct press_state)); @@ -325,7 +325,7 @@ static int hid_press_probe(struct platform_device *pdev) /* Function to deinitialize the processing for usage id */ static void hid_press_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct iio_dev *indio_dev = platform_get_drvdata(pdev); struct press_state *press_state = iio_priv(indio_dev);