kunit_platform_device_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ kunit_platform_device_alloc(9) ✨

okay so bestie, this one's from the Kernel API Manual β€” it's the kunit_platform_device_alloc page, and honestly it's giving "tiny function, big responsibilities" energy πŸ’…


🌸 NAME 🌸

kunit_platform_device_alloc β€” allocate a KUnit test managed platform device πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

struct platform_device * kunit_platform_device_alloc (struct kunit *test
, const char *name , int id );

πŸ’– ARGUMENTS πŸ’–

  • test β€” the test context, like the group chat this whole operation lives in 🫢
  • name β€” the device name of the platform device you're alloc-ing, iykyk
  • id β€” the identifier of the platform device you're alloc-ing.

🌈 DESCRIPTION 🌈

So you allocate a test managed platform device ✨ and the best part? The device gets put automatically when the test completes. Literally self-cleaning, main character energy πŸ”₯ no cap.

⭐ RETURN ⭐

  • Allocated platform device on success πŸ‘‘
  • NULL on failure πŸ’€

🧚 SEE ALSO 🧚


and that's the whole page, bestie β€” go forth and allocate responsibly πŸ’œ

this cutie lives in ./lib/kunit and the page is dated October 2026 🌸 so yeah, it's basically from the future fr fr πŸ¦‹πŸ’«

mwah, go slay some kernel tests πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from