DEVICE_ATTR_WO_NAMED(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ‘‹


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