devm_of_platform_depopulate(9)
π devm_of_platform_depopulate π
okay bestie, welcome to the devm_of_platform_depopulate(9) page β it's a kernel API manual, it lives in section 9, and honestly? it's giving cleanup icon. let's get into it π
β¨ NAME β¨
devm_of_platform_depopulate β Remove devices populated from device tree
no cap, that's the whole vibe: it takes away the devices that got populated from the device tree πΈ
π SYNOPSIS π
void devm_of_platform_depopulate (struct device *dev );
like, that's it. one function, one argument, void return. clean. minimal. main character energy π
π«Ά ARGUMENTS π«Ά
devβ the device that requested to depopulate from device tree data. yes, this device right here, the one asking for the un-populating. it's literally the device that wants its device-tree-populated children yeeted π
π DESCRIPTION π
so this function is the complementary one to devm_of_platform_populate β like, they're a matching set, yin and yang, the pop and the depop π¦
what it does: it removes the children of the given device (and, recursively, their children β yes, it goes all the way down, generational cleanup fr fr) that have been created from their respective device tree nodes.
and here's the important part, the detail you cannot skip: and only those. it leaves the other ones β eg. manually created β unharmed. like it's not out here deleting everything in sight, it's very precise, very intentional, it knows exactly which children came from device tree nodes and it only touches those. the manually created ones are safe, untouched, protected. obsessed with the restraint honestly π
π₯ SEE ALSO π₯
the whole friend group, all linked up:
- Kernel file
./drivers/of/platform.c of_find_device_by_node(9)of_device_alloc(9)of_platform_device_create_pdata(9)of_platform_device_create(9)of_platform_bus_create(9)of_platform_bus_probe(9)of_platform_populate(9)of_platform_depopulate(9)devm_of_platform_populate(9)
go read them, they're all slay, iykyk β
and that's the page!! huge shoutout to ./drivers/of for being the source home, and to October 2026 for the date stamp β that's when this beauty was dated, bestie, mark your calendar ποΈπ
kisses, this has been devm_of_platform_depopulate(9), please clean up after yourself π§β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms