linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: lee@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	jdelvare@suse.com, linux@roeck-us.net, heiko@sntech.de,
	dmitry.torokhov@gmail.com, pavel@ucw.cz, ukleinek@debian.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-input@vger.kernel.org,
	linux-leds@vger.kernel.org
Subject: [PATCH v7 1/8] mfd: core: make platform_data pointer const in struct mfd_cell
Date: Thu,  5 Sep 2024 20:52:25 +0200	[thread overview]
Message-ID: <20240905185232.2899464-2-heiko@sntech.de> (raw)
In-Reply-To: <20240905185232.2899464-1-heiko@sntech.de>

The content of the platform_data of a struct mfd_cell is simply passed on
to the platform_device_add_data() call in mfd_add_device() .

platform_device_add_data() already handles the data behind that pointer
as const, so there is no reason to not extend this to struct mfd_cell.

This allows to pass structs gathered from of_device_get_match_data()
as platform-data to sub-devices - which is retrieved as const already.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 include/linux/mfd/core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index e8bcad641d8c..faeea7abd688 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -72,7 +72,7 @@ struct mfd_cell {
 	int			(*resume)(struct platform_device *dev);
 
 	/* platform data passed to the sub devices drivers */
-	void			*platform_data;
+	const void		*platform_data;
 	size_t			pdata_size;
 
 	/* Matches ACPI */
-- 
2.43.0


  reply	other threads:[~2024-09-05 18:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 18:52 [PATCH v7 0/8] Drivers to support the MCU on QNAP NAS devices Heiko Stuebner
2024-09-05 18:52 ` Heiko Stuebner [this message]
2024-09-07 12:04   ` [PATCH v7 1/8] mfd: core: make platform_data pointer const in struct mfd_cell kernel test robot
2024-09-08  8:22   ` kernel test robot
2024-09-05 18:52 ` [PATCH v7 2/8] dt-bindings: mfd: add binding for qnap,ts433-mcu devices Heiko Stuebner
2024-09-05 18:52 ` [PATCH v7 3/8] mfd: add base driver for qnap-mcu devices Heiko Stuebner
2024-09-05 18:52 ` [PATCH v7 4/8] leds: add driver for LEDs from " Heiko Stuebner
2024-09-05 18:52 ` [PATCH v7 5/8] Input: add driver for the input part of " Heiko Stuebner
2024-09-05 18:52 ` [PATCH v7 6/8] hwmon: add driver for the hwmon parts " Heiko Stuebner
2024-09-05 18:52 ` [PATCH v7 7/8] arm64: dts: rockchip: hook up the MCU on the QNAP TS433 Heiko Stuebner
2024-09-05 18:52 ` [PATCH v7 8/8] arm64: dts: rockchip: set hdd led labels on qnap-ts433 Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240905185232.2899464-2-heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=ukleinek@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).