free_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– free_irq(9) β€” Kernel API Manual, bestie edition πŸ’–

okay so you're in the Kernel API Manual, section 9, and the star of the show today is free_irq πŸŽ€ the function that lets go of an interrupt you already claimed. yes, it's the breakup arc of request_irq. let's get into it ✨


🌸 NAME 🌸

free_irq β€” free an interrupt allocated with request_irq

like, you borrowed the interrupt, now give it back 🫢


✨ SYNOPSIS ✨

const void * free_irq (unsigned int irq , void *dev_id );

look at her. tiny signature, big responsibilities πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • irq β€” Interrupt line to free. this is the one you're releasing back into the wild.
  • dev_id β€” Device identity to free. the little ID badge your device was wearing.

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea, bestie: this function removes an interrupt handler. the handler gets removed, and if the interrupt line is no longer in use by any driver, it is disabled. periodt. πŸ”₯

🚨 on a shared IRQ, the caller must ensure the interrupt is disabled on the card it drives before calling this function. no cap, that part is on you.

the function does not return until any executing interrupts for this IRQ have completed. it is so patient. it will literally wait for everyone to finish before it leaves the group chat 😭

πŸ’€ soft warning, but loud: this function must not be called from interrupt context. like, do not do that. that's not the vibe. that's giving undefined chaos.

and the return value? it returns the devname argument passed to request_irq. so you get your name back. iconic behavior, honestly 🫢


🌈 SEE ALSO 🌈

the whole IRQ friend group, fr fr πŸ§šπŸ’œ


aaaand that's the page, bestie πŸ’– this one came from the ./kernel/irq source, dated October 2026, and it's living in the Kernel API Manual. go free that interrupt. slay πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from