DEVICE_ATTR_WO_NAMED(9)
π DEVICE_ATTR_WO_NAMED(9) β like, the named one β¨
okay bestie, welcome to the Kernel API Manual β yes this is a (9) page, yes it's a macro, yes we're gonna get through it together π«Ά
β¨ NAME β¨
DEVICE_ATTR_WO_NAMED β it defines a read-only device attribute, but the sysfs name is not the same as the function name. That's literally the whole personality of this macro. (And yes, the page says read-only, that's what it says, don't come for me π)
π¦ SYNOPSIS π¦
DEVICE_ATTR_WO_NAMED (_name , _attrname );
π ARGUMENTS π
_nameβ the attribute function preface. the little name-ner at the front of your function π§_attrnameβ the attribute name as it will be exposed in the sysfs. so like, the public-facing name, the main character name π
πΈ DESCRIPTION πΈ
So it's just like DEVICE_ATTR_WO, no cap β but here's the glow-up: it lets you reuse names under separate paths in the same driver. same name, different paths, everyone slays in their own lane β¨
π₯ SEE ALSO π₯
squad roll call, everybody's here, say hi π
- Kernel file
./include/linux/device.h struct subsys_interface(9)struct device_attribute(9)struct dev_ext_attribute(9)DEVICE_ATTR(9)DEVICE_ATTR_RW(9)DEVICE_ATTR_ADMIN_RW(9)DEVICE_ATTR_RW_NAMED(9)DEVICE_ATTR_RO(9)DEVICE_ATTR_ADMIN_RO(9)DEVICE_ATTR_RO_NAMED(9)DEVICE_ATTR_WO(9)DEVICE_ULONG_ATTR(9)DEVICE_INT_ATTR(9)DEVICE_BOOL_ATTR(9)DEVICE_STRING_ATTR_RO(9)enum device_link_state(9)enum dl_dev_state(9)enum device_removable(9)struct dev_links_info(9)struct dev_msi_info(9)enum device_physical_location_panel(9)enum device_physical_location_vertical_position(9)enum device_physical_location_horizontal_position(9)struct device_physical_location(9)enum struct_device_flags(9)struct device(9)struct device_link(9)device_set_driver_override(9)device_has_driver_override(9)device_match_driver_override(9)device_iommu_mapped(9)dev_name(9)dev_bus_name(9)device_find_child_by_name(9)device_find_any_child(9)device_lock_set_class(9)device_lock_reset_class(9)
lowkey that's the whole page, bestie. short and iconic, it's giving efficiency π
source location: ./include/linux π and the version/date vibe check says October 2026 β so yeah β that's DEVICE_ATTR_WO_NAMED(9), mwah, periodt ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms