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: 13787744 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 03EF4188005 for ; Mon, 2 Sep 2024 22:28:39 +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=1725316121; cv=none; b=BP/sfoa3IjqJRzfhHHIb1ilxuVWZUyqNaRZq1xlLtAtBnULXLmVT0Mih9PmMQ/RQoKKVgoMCpMw/RvZmYt3Q7FFDE9jnFw6mQGaRDq7nNl7hJq/f/YE5bl0hxosLCV0yGkKfEAYIiP7JqNsIdB0mag2Ny8pu4oU+m0m4OlP7A4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316121; c=relaxed/simple; bh=uSKyNDS6ptkIR0DYYsYfkgq3QP3Bq+QfzQYD1avZxDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tPuvrjgdHxXc84dJ3qJUHHReXJlpq1+3M9XjQfx1mVn9a1mB18j6N4tm/HeU4XLL41KSaZgKDAjrm0svmH6cprUEP/vPd9VGz04bAteqcvTtfN34gkltW2iOcr7qZ1ruYpKOP3HS8wBOl4zn37/0z/QJduP9auv78i+48QddCyw= 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 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-input@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: 13787746 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 49C68187FF3 for ; Mon, 2 Sep 2024 22:28:50 +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=1725316131; cv=none; b=eLWprEcajZCbqHWl43liJ6gmEKa6Yy0JTkH6r7kkDkLrkyPqE5BDkBsFZkY4oPxk6EOYla2MSU53OvPRfPM353Mu85vjB5leWp6zPZuAZW7DgaX828Ko3q4+vRMOd4wuzDE1mCZwTGtP3GaAP5VYwarcg/rFIJ8M6x3I5AoeXmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316131; c=relaxed/simple; bh=CKDqugtmZkhWcHcoOAEU1fuDv7m3PKG/IDTHg8/GOdU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aEEu5xuHogxjmuhJYQNS0tPfhsQSdkP61+HvFm5VgOuDDp49XiSCt1lNRICfLGphGrM/6oCvWt1ew4ZA97haT2xZr8LRtpbIzdDzOHPXXNnvTSWJEye2aIio8VhgEMw+26zfBSR4/BDJwh1ufXkZldKUUX4T9PHrGGfNGmXiuE8= 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 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-input@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: 13787756 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 2E813189913 for ; Mon, 2 Sep 2024 22:29:25 +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=1725316166; cv=none; b=GdRtKCtT/BW6TI31eLuwcyHtLLBOhBfTF4mrLochcgMMx7G6T7bU98qtKR0HMsELdcKgh7KRn7CJx7Y6CDG1c/Ay0iLV9LFiQdSsncnEe0kg/g7fzEMJexZzE0qpGK14Jaq57YEOgodVn0IXF4qKgQX9HZ8SWLNdOHD3ciDWsRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316166; c=relaxed/simple; bh=nHbfgrvQy0z0lM6FjGAHDJWcQ2iS9trkZXW+dADx3oY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ioVuNqg7YC5dnhEI7rNttDDWfRZcH5m90UYqrdyyV3Y6S+xg3tCnqUB/3NpYJZjuWZrcKTtHgdh9oWLYz8z2ykjAe6aWJ/snpKdl4rweCnC/ZzIBGUDbw6/J5zQxwH93Yn6o0451s+csquml4342y1Wj9V4mL7VBL32DZSbTU8w= 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-input@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: 13787749 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 0C4DE188930 for ; Mon, 2 Sep 2024 22:28:57 +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=1725316138; cv=none; b=MEDwxRtL9a1qvEBj608pBIUkStXOlEVT8LvMaOT2a2qu7XZB1maCYZdCzVbKETXTdkjC56JPwqPcObLqc/yz+V/U+OuNP1jsUe70eIBww9h25KIei9j7cNE3BM1APH4jTeGtJGVBnuzdafJVOEL7j5b4P4Jx1LlZvEdAkUmN2TA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316138; c=relaxed/simple; bh=T/CgH+qXQHoXnPD9XO3eOWuwN2VpZYAO5w82WXns/1c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u0qT5+sB9VH6gEUXO/orWUO+etB8oEMFP6+jd2yWlYjRg+CNXuIl5Gfawm/zR7cgT5Nm9ZK8Q7HkvIFjpK0vdqnwOK5y6QiLtYrP+Vlche90mIhP1PmwjlX5wcMcRjsx/f6/0uK5uMXzbK9fkEKD1IdCI0/09/0kiHLTOyCz3jU= 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 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-input@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: 13787741 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 A8E9F1A4E8A for ; Mon, 2 Sep 2024 22:28:34 +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=1725316116; cv=none; b=EO6SV56j1hXceLtgvWpHqTbzNYxXhRaQX0kUWxFrDtxClcswGHXP6QAOn6muB+TGUXPGOqH2h0h4aqWtMXJDHBmddhTDUMCXi2COz13+DdkdUD/p2ephD0QlGuDhYylXJqVqxlIIjnWbS8ptGFag2E39b/Qrr6Creql2QznmpO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316116; c=relaxed/simple; bh=TJVJWUgFroHz4D1KAqxrh0hBNP9FzfldUPa3LBUsFjI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E8JE/Gl9hUZ42TFHokXyulu/3UNspQsgqQ7qdKq65VZmQiwGaSpXIpzJOWv9LV52r8oWC4mWm2bt4+T7egnCmM/LD0BFZj8X7RgrIbzuxhDk6A+PT0Kp4nqjIoC6GcZjbPrKnrGP4HFyHq+ysHYQqMxRQjbvOdmiUhiVFcF4IK0= 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-input@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: 13787759 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 9DFD0187FF7 for ; Mon, 2 Sep 2024 22:29:31 +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=1725316173; cv=none; b=AI0i9tg/BUk3eJy52oqD/QKZ9BhdI5useQ6PYHdNFtbZhN2C+jTLRN0AQbm+rDB24SwJ4kFnVyrYuFR23Ne7/atB9u2LWXN/WFPjopN6/EVhV5cBQwMBHtapm9UkmE7v0OOgWDAgAOqs2O/s0ihSuvn3+XZSh7FYI4j21iktGV8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316173; c=relaxed/simple; bh=JbN8T71a/PZKhOL1QNhERt7e8cyfCWMB8Ep8u0D95s4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jvblGuZnfEaA27/TJg8VWcchyhyUPqVv4ZE5KfOqjo1oWpxA3UUfP2SjIEEEqftkdaKCjuO8fiBrClo8GTVzQus0XI6DtAWQqSesNP0QuUy3KBZIpMqViNCMbuG3r1wiaGdX/Lg4XT+pV8p325WYedtbNebfRr1JYdE2ltDvpYg= 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 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-input@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: 13787748 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 507A31885A0 for ; Mon, 2 Sep 2024 22:28:54 +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=1725316135; cv=none; b=aLeW0VOgzN9xnwBtadmqR2m4iyvrDSHGxO4v31KFZspbVzA7Zi/xvyOp+sDW6yrr20N7mbaw0IOfwqCHd2ZQiSwGqf8uPv2+8kxINVb3mqnOowHm28EordZDuM1d1bIx2wQnHnUcTpveWmntyZtwnQXVqiuJfvPlsFv7aULodLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316135; c=relaxed/simple; bh=bCouMPCfZo5pf56gbl+7wP0aa2XkCRIomN3pfQ0D6fw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t12E9WJU1J9BAdl/my3j4E9b4BnXVBQTy7csIWIkZobQjfJmN5363CYPt+0LyiTn0mXFxsxNwIoAwYCaHnAwROLOHWpZC8uys+wW0op1T2N9XftpV9sqZnS2IfatPEvrb1hAAzInkjizI1ng6QAI5PaisBijCaZ6HjulgMZReME= 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 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-input@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: 13787762 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 E1C44190057 for ; Mon, 2 Sep 2024 22:29:54 +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=1725316196; cv=none; b=Lhx8NoB9GMwNUKkZwzYTP19DF22v+9pFo4FxX6Dz4wrWCou8fTopTRksW77ScTGuSXrbZjjVX2AxDNOxJBcqtP+aW0PONPTWtIZiXUolqCHek9pJwSsXlPl//7Ow7E/5IpcdmanYqxX4AehIBvbKaXB4mIz4nevGEtbIpXu83tg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316196; c=relaxed/simple; bh=6s0/uK8OpJ0JPPuTa8tnsMtjG6IVSRGiOMZJleFz5mc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fldaz7khFEbX7dci7lc8xdeY2a6LDEuoHh5FQ2CAc0DM6U2MGYUc3Ux8w64dH/cgJ43ADB8Av67ldltJQ4aptJL9e0wS5wcxwnpN/0NGIVb2Q4GArB9X13ULmmn1BmerR7IvXq7aouJsE5Ypq/bM8cUb8M/OqV+eL4vJ7ZAZofA= 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 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-input@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: 13787753 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 7E54318A6C0 for ; Mon, 2 Sep 2024 22:29:13 +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=1725316154; cv=none; b=DYL+Ehh28BPOekVbctNmNUrwBCWm7Tk+gRWczoqm74I2YCH8mYNlxl5c/g6G5o4uutW+b2cPZOT0GrWReN8EtBL55j1xsfdPdB90TFJ/bOIX7fYnviq0gmXOdu07868ikRboy1LKoGTpziHKMsNE9pOdJ3isYnPtslea2pcvuNQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316154; c=relaxed/simple; bh=IexbYayyC/SvK2mi1ITqMIUsEbQ0bFiYfoYDnybmghM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EinJV08iEyaIPg/Ihp403MfJDz09EY45drz4btU0BduSWwc+AUxsCjrDWZVSgT5MzTzKgYimJeK6h+77Fss3z3HWdMd6o1ZEaS1qrZWGP6+O5eYDWa+kK1tNAZvpYHSJ42EEd2Z6ruDnn9P4Kder7AA60mNfRyM5BIy0uW9D5Js= 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-input@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: 13787742 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 5D14D187849 for ; Mon, 2 Sep 2024 22:28:38 +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=1725316120; cv=none; b=fxGU62SqkZLlI4T3fkRcsIvj5oInfYSvrrgB9M2vSoA2rUa5oQbhqf306vWuVSOJDcUMkbzjvbYm4w+6MbyQrmvl2tot8yjiDFKp/ZOXw119Zwz8YkNMggwR6mT6LmclHbnwNflfRhloRH7phidOiq4USScZ4lzXjtljKEV4a8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316120; c=relaxed/simple; bh=QWPgIRpwXymjEgzsDh0vqG0Bdp+osf8cuQX3gO2Y+Z8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZzPLM/HxiiqzoUtHXfbvRCvW9LU5r7HAp6TuX8FZ7S7zJzLtbYRNA6axt1xhn++VqLKEl2nUMb68UDiTvZBJlBEvORONQksNeDcVRJXCQC2Ff8vQbTPUIIIu8oWMiJMya4U4P138jqFOSqdf0mV4ucpdM1LH+61clk9vuHdAm7s= 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-input@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: 13787750 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 3AF2E188A0D 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=1725316141; cv=none; b=LcePefiK/IJ+CReWixYeBcWNcxkn3vpkihQmYQ3mGfa4/chTRLED01fMLBWEGo0lbLHQtWj8k6kvGHuEKAVnmZnJHuCjE4/xFSCFBJH/EkAWDMRhDy8xRaHzmUMc6D8rUKq2ZmW9sqsi+2skanzTRNJ2gn2UfTcfvSf2iZXB+io= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316141; c=relaxed/simple; bh=U5tPKRhx3B0vC940BTl3CGTtxTUpWANOirSrm2oN9OE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DxcXDzVb50jOie92AbIShMOJ+MpKg5NygcfSOlEUva9Uy3aAKbcQa3VOH344hxZtzqhEFDa5F0Id3YeSjAlbPb+1KQqbR9EL3JVwYTCmzfBr2mkPrLVDnQZLmEwARuhngFtDNgQzrtZI+X2Q7tP2zmKZmqPwWDf2xFO4mCT/qss= 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 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-input@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: 13787745 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 49F31188913 for ; Mon, 2 Sep 2024 22:28:47 +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=1725316128; cv=none; b=q8wcMgY2h1e3inrTAWwSsvKzvuIZ9SGv4/gU3A4hdKeESCZpoDuaAne4O1NVmn2GCsau8c86Krupge/2zOkSBJgZBnvCV9EZkrIXC+JVYec8gzF7pdzwXplNVSoeZX9GpfBUJo/fcd4grhF9NlmptJuyC4/dgjQKxPnewpK2ltY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316128; c=relaxed/simple; bh=Si0/H2gUZIrbXyiSDxnyLN7gSZnhZ28PRqd1ubbwWh8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sss1OCE5TuMJ3Wm6wRHXrISc9bKhqK9rDYK82rDypIL2XAmLVPiR5ethcQk9DkUOVhQE93eHmcw1WcJd025JpNxRyQg3NX4ozW+51Oer6VHkWUdD+aUYqLZA9sRRWTh1PwdnIrsVfZq6WLKN7IOk/Jz8N10lRtRhQqJ7BV56XEY= 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 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-input@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: 13787755 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 4584718787F for ; Mon, 2 Sep 2024 22:29:23 +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=1725316164; cv=none; b=b+lz2EDApjbWruxOdoumaxZQ8yIibtfhbACraL2FWK9FtTpTeXf+vRjJVFP+Z2r7cyV9bPTT1i9xyQXCA1A/ET+wUdFBIfJeir/9CGGsMB5CHMpVqGiUwqM0fsX7W1/63sFzcAaXRBuRcODuDC3GnaXqaJaQiEZoa3xXWlszT+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316164; c=relaxed/simple; bh=3dUeMEczuVrufl8SGQjkyOoqnQqLp4XWk+aY6v1VujM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gI3KiBbfcB9Gm9TSG5E5GVZCFa/Vzste5jC/crvhj7spgIqCG+FqC0ySSEK8kYioqjuLZrRefq22asxnbPlsyErmX7BnsIc3odwQBGMxE/KPmQl13St3ok5kp4V+yGwiIx0MdSi0Tsok7XoHeIwqI8kq57qdkUt7X90FbISsNpU= 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 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-input@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: 13787758 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 613A418BC17 for ; Mon, 2 Sep 2024 22:29:28 +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=1725316169; cv=none; b=NfwSov/QgcOTTetcKOGmiDCBaQN6npQPZ6IarZcboKOwai3td/8eYtXxLR2qSX4vMTsy+EY5EyXK10Z0gVx6laESB6M3ZwOoedtPKX3hOE65bnqA3+rC1kTaacb7iKWSOf7U1k8aKjaGsEMbx4fy+D6WkTMQOaGWuaJkhvuuTzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316169; c=relaxed/simple; bh=rz4cPLPk4U/N9gxi84pXdf1L9hx4wLHD3D5UxEPPbnc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dto+rLuCKCeUB2bn1tsuMKiJtHpxnqrRpGy1LDKKQ50LIFFitsnq6iKo9GhBhcDIARbAcxoVCaaEDcSEN8KtOjcBk8zz5SCxHXIKRNZ8PqQ/+OyVrqCWVmheyp3B3KzlTjWy29FQ0FytrOmkwcapbcKvYlnUAt1oVEZunHWG/II= 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 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-input@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: 13787751 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 013B9188A14 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=W4oDe+wwVSRI7t5WA8ZqQxTUK+fUNyO06R0+qtZngkcxmZnILFhdWwaMUK2b/YD6pUrA+AK/dvr9i45sOVACesFmg0+ksZDcr7Jz4x6cukWtlJC5gj8xXCHJdUzU7Wi1/Y2dcc4IUIKviOqdoKg2S4zpw4RMzVOSLg6i+tcHh9c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316142; c=relaxed/simple; bh=eMaJ1XGIgYbncwGBJDENIO5v1xzNDJoTgR/7qtZXcTA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LP9R5wb6Yx21AZt7l6lGcxhKOF71rcJG/cplRAGjDinsFAx434IOLilbqFD8R/3F+fvP0V5BBO2w7dcXQje4j/Vl1TyXNzkdXNPGzc3TAMVhGMlnj60yw/iDdjmPKVABVacA8N0Em0KDjx7cpD4AfaA9Xdy5kLaX6aZXArimzhA= 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 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-input@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: 13787754 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 7414F18BB85 for ; Mon, 2 Sep 2024 22:29:18 +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=1725316159; cv=none; b=YlEOVfyXjaDqvwvIAclNz6TRGO3UQ0yNCr+RG0AyV3qPoPhKZGEKMODHk8/SGwX1p7EUMa1RwgzCfF/CLa86Xa90B1WHisqq5FLXXRew3+Rjy8+/JAqwT5WNLwsGlwX7k+Ygpy6GVtgPVkyLNkWzUlsFzmbHXJWICNf5VX9lC50= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316159; c=relaxed/simple; bh=na8Ih3U30oMUt4tlFrC4bjWSAbvwr6i7Vjw2ATFC8Pk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g0uM2IDqd1yPM08+izgTAEPMjy5nhXmEnlZPTD3W4pprDj/pGuRpnUxSjpSWecYS/8hg7FunUCwEbwgXUKVtZKDF9sWVTkSNQCT9wUWG0doIb1KGTO1uBT6iYghGVeauUX9Rq5rnuUh5mWzk/kAOna+xC/FYtNyZfB5v9sdyWt4= 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-input@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: 13787747 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 99A5A187FF4 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=l+tZaeoQ5HbW38J9sekT+Tdg0m0q4jsFICPEpFzfi1NML7pHgLr71F/Jp2WXGssFhyUAOZ8yiLAD8bF7TRYJsUmR4G9eQ37VZnEWM2EY2VQPD/UDRpaRd56dKSA6AmD/N44Z0przXQiPFTE3VvCdAUHBJ34iWQa9fHSfhwKFUJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316132; c=relaxed/simple; bh=Uy3gw0baEyg93YMzdsYyOhpSjIuIj+PESe4MBDgyQns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p4Z18gonBnCkcVCUVbDXDK3cVCWpTBNZ60JN1NupVcEQYl2pouUcs9lVSFlpkX9fjZG2DDplDqC9Z7LGlAsZJZQfQnJAzZq5Zwg8XdMCMFQCKCp7welgwm8jCDMWed39q4dLDEH2mAKkpDyk8wls5chmZ4PlA38OHaOGAJp3Cf0= 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 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-input@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: 13787760 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 4D5AE18C35C for ; Mon, 2 Sep 2024 22:29:33 +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=1725316174; cv=none; b=GYmXiWiyOJWSJFXxJR15nyMQa796Q989ImT3X8BUOX1K07HIUsMCRjxzMujHxcmjTMt2wmfIDIFPPiv0/UZqGt25vxChqfyhgA/ZszgOjY+7bQaOScgYSrd9jcRawishxOn8pNz0Q+eVNFn2tXOPakZmq3/4yfSIBWW2yayV+x4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316174; c=relaxed/simple; bh=VPi5go2UZSyYcoqWpNRAu5quJSpMf/nZhR31FMIQHoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GoM2wGu88VW6eXGaffNkZojor0U/GBPgmgQYtwsxKPJeS8bddSqokDAdVyzI2b+3bCSGaqnKUplVQUclSYAsnRuooyY5wnHFmtZD9Xo6eG+WOJJKgkiydTMoM8SjbEkYKc61Fe8+6Jkpyof5gDgcCQPi+cvo58Pd0L/Eg0/cMzM= 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-input@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: 13787761 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 C22E7187FF3 for ; Mon, 2 Sep 2024 22:29:41 +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=1725316183; cv=none; b=AJ7rdCTwWjegp6iRGn6hteL1noH+eAAqXSIV2398f+l0b9hyYBi2pzAiDcqL/sIxGsPc/ser7PQ7PakM3dl/NkExRgl1wbgmJa2scTDmAECD+uUoF6mzbiFuxonNtxtaHQSD2DtRdV8l3lnBbXMzQEV1BTCw0ljKC6X64wHfeJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316183; c=relaxed/simple; bh=Ul7D5wVVmqAMqo0mpEDHlr0YAPA1NGYKbyJmDz49LVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p0RuqHW6zwpzd5v8qQHslv6v6CrLkrxihjWHPCk0ekcoojwbX6Y2X0w74OcCRY/K5vIH+PJ98GLEkiaTqQsGEOLCTdsdsgbjzSoTp1YZzxSfeyNc1OgxkNDT7nmMitOWw6A7UjJNUZWdy6jyC7cxlj0ZvR40veN1cnCpGGMWI2A= 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-input@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: 13787763 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 703AA19046E for ; Mon, 2 Sep 2024 22:30:01 +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=1725316202; cv=none; b=Ye/o0Ih+pukIbyx/koI9jiUuticVZqM+i+5dNYiRDpXShwtpVGUO020smkgH80+XmDXynjemseTTIRyZf7sGDnqNNEK4zyX+gEDJ3Aklcqh8yhvg9pozMidgP71hnaktMibTRahQZhv5NqjM6ujzA9bxvUIhYT8m65qj47GxEc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316202; c=relaxed/simple; bh=wVFOFwNG96ZS5JTknDbiM35iEs7p1s20pBFB9wSWHWs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GTM7Cep+DWAA7sFL2tdLRMHXOZQAX1HLsMjRfuLcgafQ7i5/Y8Xq56SNu23K0fU83zk6eXjL8n1fzum6XvlvSn/WeDFUkvKoCPY/uDaqsTtNLa606zNsU7kT6jl9YE1c5bhIhkrX+c3llldVB3H46q5dphSL8K6mWu1b2k9Uw8s= 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 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-input@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: 13787757 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 3EF1418BC17 for ; Mon, 2 Sep 2024 22:29:25 +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=1725316166; cv=none; b=BsJ+1V5o5kuwG3I9VME+//GfZdXGpAlnWXtlfV3SPqeUmMK7DQfYoy+IYltIyYTlF5kZAZVZ6smITsjIzYTPzG3drICpuMaZF5SWo1U1QCAiVRnu/nLMPkhSxBYnF0KSafo4MIbEHux56OXsbyNd+OjomuG2jOiZfUpr/dWIouA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316166; c=relaxed/simple; bh=q2W2x5oyaNvC8UUAdV6wNNKiWrB5DlPCM9Iu48dwc60=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jcy11wfgMjXBcNg7jLMPGqdBGmLAuTfe/IHGfcUfPpQxiMvzs+2lBU4fcnB5vRfLHQRSctNWk4DwhS6wHU9mJD03POXEYbyiFGxao6k+oKjs+Es3CLXy8ER7ImRNVgLNk+0nqeg4ocZeyt2y3do9XihkHKhLRWWSZEDTyAZDGmc= 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-input@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: 13787752 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 12770188599 for ; Mon, 2 Sep 2024 22:29:07 +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=1725316149; cv=none; b=f64FAW5uFJ3jCQtwMiM08rsuNNzuJ0wsR4nY80FvCiVzorUz/EI8jfigyZMzYV4bfob7ayGsRAGkWGh52xfoGM/8yxSJh881GrUhX/gr15tR4FwI6CAB9kGFTVsHYcR6JkEYHCOXu9WPIGmRVGFzP1G7/kUjWSS5Mp+B2fqZV+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316149; c=relaxed/simple; bh=Axn5OvqB+CcBxhl3sti9L7ZitYsHqJrWtIcCua+j95g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jfhQQNHQwfkMx6Jxv6l+/k0lmOemt9hXDEFYf1HijT7QPuBT3now9Nj/BLEvEq1RSBsSlMi5XtqaxjJV4Kz0lrGbfEL4Slyn91KUR77MNyuhqeDxZtjtQxEkThK5ZvspJTWBIjZLCbu/hpuKBuILFd/yf6fWjSrFB04ylsszjoo= 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 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-input@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);