DEVICE_INT_ATTR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… DEVICE_INT_ATTR πŸ’…

okay so bestie, this one is from the Kernel API Manual β€” section 9, the driver/kernel zone. it's a macro. it's tiny. but she's important, so let's give her the main character energy she deserves. 🫢


✨ NAME ✨

DEVICE_INT_ATTR β€” literally the macro that defines a device attribute backed by an int. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

DEVICE_INT_ATTR (_name , _mode , _var );

(yes the spacing is exactly like that, don't @ me, that's how the page prints it πŸ’€)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • _name β€” the attribute name, aka what this thing is called πŸ’–
  • _mode β€” the file mode, yep, the permissions situation 🌈
  • _var β€” the identifier of an int. like, the actual variable. the star of the show ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

ok so the manpage is being ✨minimalist✨ here, and honestly? iconic of her. it says:

Like DEVICE_ULONG_ATTR, but _var is an int.

that's the whole description. no cap. so if you already know DEVICE_ULONG_ATTR, you know this one β€” same energy, except the backing variable is an int instead of an unsigned long. and if you don't know DEVICE_ULONG_ATTR... bestie, go read that one, iykyk 😭


🧚 SEE ALSO 🧚

this list is LONG and she did NOT come to play. every single one, in order, no skipping πŸ”₯

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_ATTR_WO_NAMED(9), DEVICE_ULONG_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)

like i said. LONG. she ate. πŸ’…


and that's the page, bestie!! πŸ“ cute little sign-off time: this beauty lives over in ./include/linux, and the page is dated October 2026. mwah. go define some int-backed device attributes. slay. πŸ’œ

πŸ“¦ where this page comes from