pm_runtime_get_if_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pm_runtime_get_if_active(9) πŸ’–

okay so this is the Kernel API Manual, bestie β€” and today’s main character is pm_runtime_get_if_active. yes, the title is right there, and the manual name is folded in like a little name tag. Let’s go. ✨

✨ NAME ✨

pm_runtime_get_if_active β€” bump up the runtime PM usage counter if the device is in active state. periodt.

🌸 SYNOPSIS 🌸

here’s the exact signature, no cap β€” keep it verbatim:

int pm_runtime_get_if_active (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” target device. that’s the whole argument, bestie.

πŸ’… DESCRIPTION πŸ’…

okay so here’s the tea. This function increments the runtime PM usage counter of dev if its runtime PM status is RPM_ACTIVE β€” and in that case it returns 1. slay.

If the device is in a different state, 0 is returned. no bump, no drama.

And if runtime PM is disabled for the device, -EINVAL is returned β€” and in that case the usage_count will also remain unmodified. so no sneaky counter changes, okay?

heads up: that -EINVAL case means runtime PM is disabled for the device, and the usage_count stays unmodified. iykyk.

πŸ¦‹ SEE ALSO πŸ¦‹

okay bestie, the related-lore rabbit hole is deep. Go read these:


that’s the whole vibe, bestie. this page is from the source/version ./drivers/base/power, dated October 2026, and it’s pm_runtime_get_if_active(9) from the Kernel API Manual. byeee, go bump those counters responsibly πŸ’–

πŸ“¦ where this page comes from