[PATCH 0/5] driver core: Allow the constification of device attributes

Thomas Weißschuh
2026-04-08T19:30:51Z

Allow device attribute to reside in read-only memory.
Both const and non-const attributes are handled by the utility macros
and attributes can be migrated one-by-one.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (5):
driver core: Delete DEVICE_ATTR_PREALLOC()
driver core: Add low-level macros for device attributes
driver core: stop using generic sysfs macros for device attributes
driver core: Allow the constification of device attributes
driver core: Constify core device attributes

drivers/base/core.c | 50 ++++++++++----------
include/linux/device.h | 122 +++++++++++++++++++++++++++++++++++++------------
2 files changed, 121 insertions(+), 51 deletions(-)
---
base-commit: 6c8dfb0362732bf1e4829867a2a5239fedc592d0
change-id: 20260408-sysfs-const-attr-device_attr-prep-9971fb4439da

Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>