From: Thomas Weißschuh Date: Tue, 12 May 2026 16:39:11 +0000 (+0200) Subject: driver core: Delete DEVICE_ATTR_PREALLOC() X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=cdd4c98d5a0e320b18fcdbd37a30a732aec624da;p=thirdparty%2Fkernel%2Flinux.git driver core: Delete DEVICE_ATTR_PREALLOC() This macro is unused and would create extra work during the upcoming constification of device attributes. Remove it. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20260512-sysfs-const-attr-device_attr-prep-v3-1-cb7c17b34d52@weissschuh.net Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/device.h b/include/linux/device.h index ac05c6e0af1ba..5daed9c929795 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -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.