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: 824750 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: 824754 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: 824745 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: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: 824748 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: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: 824752 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: 824747 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: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: 824749 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: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: 824751 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 --- 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: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: 824744 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: 824743 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: 824746 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);