usb_autopm_put_interface(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… usb_autopm_put_interface(9) β€” like, the whole vibe

okay bestie, welcome to the Kernel API Manual ✨ this one's a little function with a big job: it's the "k, i'm done with you now, go nap" button πŸŽ€


🌸 NAME 🌸

usb_autopm_put_interface β€” decrements a USB interface's PM-usage counter. that's it. that's the whole thing. she's a decrementer πŸ’…


✨ SYNOPSIS ✨

void usb_autopm_put_interface (struct usb_interface *intf );

no return value, no drama, she just does her thing πŸ™ˆ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • intf β€” the usb_interface whose counter should be decremented. yes, this exact one. this is the main character of this call πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• this routine should be called by an interface driver when it's finished using intf and wants to allow it to autosuspend. a typical example? a character-device driver, right when its device file is closed. like, "bye, i'm done, you can chill now" 🫢

the routine decrements intf's usage counter. and when that counter hits 0? a delayed autosuspend request for intf's device gets attempted πŸ”₯

⚠️ heads up though β€” the attempt may fail. see autosuspend_check. not every nap request gets approved, no cap 😭

and the vibe check on where you can run this: this routine can run only in process context. not interrupt context, not anywhere else. process context only, periodt πŸ’€


🧚 SEE ALSO 🧚

kernel file ./drivers/usb/core/driver.c β€” and honestly, the whole friend group:

like, that's the entire group chat and they ALL ate πŸ’œ


okay that's the whole page, you slayed by reading it 🌈 this gem lives in ./drivers/usb/core, dated October 2026, and it's part of the Kernel API Manual β€” mwah, go forth and decrement responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from