Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: remove DRIVER_ATTR

DRIVER_ATTR is no longer in use, and driver authors should be using
DRIVER_ATTR_RW() or DRIVER_ATTR_RO() or DRIVER_ATTR_WO() instead in
order to always get the permissions correct. So remove it so that no
one can use it anymore.

Acked-by: Alan Tull <atull@kernel.org>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+6 -6
+4 -3
Documentation/driver-model/driver.txt
··· 196 196 }; 197 197 198 198 Device drivers can export attributes via their sysfs directories. 199 - Drivers can declare attributes using a DRIVER_ATTR macro that works 200 - identically to the DEVICE_ATTR macro. 199 + Drivers can declare attributes using a DRIVER_ATTR_RW and DRIVER_ATTR_RO 200 + macro that works identically to the DEVICE_ATTR_RW and DEVICE_ATTR_RO 201 + macros. 201 202 202 203 Example: 203 204 204 - DRIVER_ATTR(debug,0644,show_debug,store_debug); 205 + DRIVER_ATTR_RW(debug); 205 206 206 207 This is equivalent to declaring: 207 208
+2 -1
Documentation/filesystems/sysfs.txt
··· 366 366 367 367 Declaring: 368 368 369 - DRIVER_ATTR(_name, _mode, _show, _store) 369 + DRIVER_ATTR_RO(_name) 370 + DRIVER_ATTR_RW(_name) 370 371 371 372 Creation/Removal: 372 373
-2
include/linux/device.h
··· 307 307 size_t count); 308 308 }; 309 309 310 - #define DRIVER_ATTR(_name, _mode, _show, _store) \ 311 - struct driver_attribute driver_attr_##_name = __ATTR(_name, _mode, _show, _store) 312 310 #define DRIVER_ATTR_RW(_name) \ 313 311 struct driver_attribute driver_attr_##_name = __ATTR_RW(_name) 314 312 #define DRIVER_ATTR_RO(_name) \