platform_de...dd_resources(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… okay so it's platform_device_add_resources o'clock πŸ’…

bestie, welcome to the Kernel API Manual β€” yes, that one β€” for platform_device_add_resources. it's giving β€œI copy your resources so future-you doesn't get left on read.” let's go. 🫢


🌸 NAME 🌸

platform_device_add_resources β€” add resources to a platform device

✨ SYNOPSIS ✨

here's the signature, exactly, no edits bestie:

int platform_device_add_resources (struct platform_device *pdev , const
       struct resource *res , unsigned int num );

πŸŽ€ ARGUMENTS πŸŽ€

okay so these are the three things you're feeding it:

  • pdev β€” the platform device allocated by platform_device_alloc that you're adding resources to. yes, that one. πŸ‘‘
  • res β€” the set of resources that needs to be allocated for the device. it's giving β€œhere's the resource bundle.” 🎁
  • num β€” the number of resources. literally the count. πŸ”’

πŸ’– DESCRIPTION πŸ’–

this function adds a copy of the resources to the platform device. not a β€œtrust me bro” alias situation β€” a copy, no cap. πŸ’…

and the memory associated with the resources will be freed when the platform device is released. so the cleanup is tied to the device release, periodt. 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/base/platform.c is the home base, bestie. then go peek at the whole platform squad:


🫢 that's the whole page! from the Kernel API Manual, source ./drivers/base, dated October 2026, filed under platform_de...dd_resources(9). mwah πŸ’‹
πŸ“¦ where this page comes from