]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
driver core: Delete DEVICE_ATTR_PREALLOC()
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 12 May 2026 16:39:11 +0000 (18:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2026 11:36:24 +0000 (13:36 +0200)
This macro is unused and would create extra work during the upcoming
constification of device attributes. Remove it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20260512-sysfs-const-attr-device_attr-prep-v3-1-cb7c17b34d52@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device.h

index ac05c6e0af1baa58dfc5e7aa075d3f56c0c2decf..5daed9c929795f4faaa044c844c8713fc2b96ea8 100644 (file)
@@ -156,19 +156,6 @@ ssize_t device_show_string(struct device *dev, struct device_attribute *attr,
 #define DEVICE_ATTR(_name, _mode, _show, _store) \
        struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
 
-/**
- * DEVICE_ATTR_PREALLOC - Define a preallocated device attribute.
- * @_name: Attribute name.
- * @_mode: File mode.
- * @_show: Show handler. Optional, but mandatory if attribute is readable.
- * @_store: Store handler. Optional, but mandatory if attribute is writable.
- *
- * Like DEVICE_ATTR(), but ``SYSFS_PREALLOC`` is set on @_mode.
- */
-#define DEVICE_ATTR_PREALLOC(_name, _mode, _show, _store) \
-       struct device_attribute dev_attr_##_name = \
-               __ATTR_PREALLOC(_name, _mode, _show, _store)
-
 /**
  * DEVICE_ATTR_RW - Define a read-write device attribute.
  * @_name: Attribute name.