[PATCH 1/5] driver core: Delete DEVICE_ATTR_PREALLOC()
From: Thomas Weißschuh
Date: Wed Apr 08 2026 - 15:31:19 EST
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@xxxxxxxxxxxxxx>
---
include/linux/device.h | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index f0d52e1a6e07..8ba3168180e5 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -157,19 +157,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.
--
2.53.0