public inbox for driver-core@lists.linux.dev
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>
Cc: driver-core@lists.linux.dev
Subject: [PATCH 2/3] driver core: make struct bus_type groups members constant arrays
Date: Mon, 16 Mar 2026 23:10:31 +0100	[thread overview]
Message-ID: <265f6584-8edd-48a0-9568-a9d584b9ec3a@gmail.com> (raw)
In-Reply-To: <fae35d74-f1b9-4785-8d7b-e553c22387ce@gmail.com>

Constify the groups arrays, allowing to assign constant arrays.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/linux/device/bus.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h
index 63de5f053..c6a3e16b7 100644
--- a/include/linux/device/bus.h
+++ b/include/linux/device/bus.h
@@ -80,9 +80,9 @@ struct fwnode_handle;
 struct bus_type {
 	const char		*name;
 	const char		*dev_name;
-	const struct attribute_group **bus_groups;
-	const struct attribute_group **dev_groups;
-	const struct attribute_group **drv_groups;
+	const struct attribute_group *const *bus_groups;
+	const struct attribute_group *const *dev_groups;
+	const struct attribute_group *const *drv_groups;
 
 	int (*match)(struct device *dev, const struct device_driver *drv);
 	int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
-- 
2.53.0



  parent reply	other threads:[~2026-03-16 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 22:08 [PATCH 0/3] driver core: make struct device_driver and bus_type groups members constant arrays Heiner Kallweit
2026-03-16 22:09 ` [PATCH 1/3] driver core: constify group arrays arguments in driver_add_groups and driver_remove_groups Heiner Kallweit
2026-04-02 15:11   ` Greg Kroah-Hartman
2026-04-02 16:25     ` Heiner Kallweit
2026-03-16 22:10 ` Heiner Kallweit [this message]
2026-03-16 22:11 ` [PATCH 3/3] device core: make struct device_driver groups members constant arrays Heiner Kallweit

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=265f6584-8edd-48a0-9568-a9d584b9ec3a@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=rafael@kernel.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