device_offline(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ device_offline β€” from the Kernel API Manual, section 9

okay bestie, gather round, because this one is short but it's important πŸ’…


✨ NAME ✨

device_offline β€” get the device all cozy and ready for its hot-removal era πŸŽ€


✨ SYNOPSIS ✨

int device_offline (struct device *dev );

✨ ARGUMENTS ✨

  • dev β€” the device you're putting offline, bestie. that's the one. that's the target 🎯

✨ DESCRIPTION ✨

so here's the vibe: this runs the device bus type's .offline callback β€” if present β€” to prep the device for a subsequent hot-removal. like packing its bags before the Uber shows up 🧳

and if that succeeds? the device must not be used until either (a) it gets removed, or (b) its bus type's .online callback is executed. no cap, it's benched until further notice πŸ™ˆ

⚠️ call this under device_hotplug_lock. that's not a suggestion, that's the rule, and the kernel does not do gentle reminders fr fr πŸ’€

✨ SEE ALSO ✨

the kernel file ./drivers/base/core.c and honestly the entire extended friend group πŸ‘‘


okay that's the whole thing, you ate that 🫢 and for the credits moment: this page lives in ./drivers/base, it's dated October 2026, and it's officially device_offline(9). slay, go take a device offline responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from