of_device_alloc(9)
π of_device_alloc(9) π
okay so weβre in the Kernel API Manual, section 9, and this page is all about of_device_alloc. The vibe? Allocate and initialize an of_device. iconic behavior, honestly. letβs get into it, bestie π«Ά
β¨ NAME β¨
of_device_alloc β allocate and initialize an of_device. no cap, thatβs the whole name moment. π
π SYNOPSIS π
hereβs the signature, copied exactly because we do not play around with code:
struct platform_device * of_device_alloc (struct device_node *np , const char *bus_id , struct device *parent );
π ARGUMENTS π
npβ the device node to assign to the device. this is the node, bestie.bus_idβ the name to assign to the device. it may benullto use the default name. slay.parentβ the parent device. periodt. π¦
π¦ SEE ALSO π¦
the kernel file is ./drivers/of/platform.c, and these are the related references β all names kept exactly, iykyk:
of_find_device_by_node(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)devm_of_platform_depopulate(9)
mwah π this page lives under ./drivers/of, itβs stamped October 2026, and it answers to of_device_alloc(9). slay forever β¨π
π¦ 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