DEVICE_ATTR_WO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… DEVICE_ATTR_WO(9) β€” bestie's guide to the kernel API manual ✨

okay so this one's from the Kernel API Manual (that's the manual name, keeping it cute and official up top πŸŽ€). Strap in, because this macro is short but it serves.


🌸 NAME 🌸

DEVICE_ATTR_WO β€” it defines an admin-only writable device attribute. That's it. That's the whole vibe. Write-only, admin-only, no reading, we don't do that here πŸ’…


✨ SYNOPSIS ✨

DEVICE_ATTR_WO (_name );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • _name β€” the attribute name, literally the name of your attribute, that's the whole job 🫢

πŸ’– DESCRIPTION πŸ’–

So it's like DEVICE_ATTR, bestie β€” same energy, same family β€” except the mode is hardcoded to 0200 and the store function is <_name>_store.

That's the whole tea β˜•. 0200 means write-only for the owner, and <name>_store is the callback it generates for you. No cap, that's all this macro does, and honestly? Iconic. Let it be simple πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

Everything below is straight from the kernel file ./include/linux/device.h, so go read these if you wanna go deeper, iykyk πŸ“š


no notes, the whole list is here, go click around, that's the assignment 🧚

and that's a wrap!! 🌈 this page lives at ./include/linux, dated October 2026 β€” mwah, slay, periodt, hope this helped bestie πŸ’œπŸ“

πŸ“¦ where this page comes from