of_machine_get_match_data(9)
π of_machine_get_match_data π
okay so welcome to the Kernel API Manual, bestie β this one's a lil function from the device tree corner of the kernel, and honestly? it's giving "short and sweet, does exactly one thing." no cap.
β¨ NAME β¨
of_machine_get_match_data β tells you if the root of the device tree has a matching of_match structure π
like literally, that's the whole job. it checks the root, and if something matches, you get the data. if not? you get nothing. iconic minimalism.
πΈ SYNOPSIS πΈ
const void * of_machine_get_match_data (const struct of_device_id *matches);
she takes one pointer and hands you back a const void * β that's it, that's the whole signature. slay π
π¦ ARGUMENTS π¦
matchesβ aNULL-terminated array ofof_device_idmatch structures to search in. yep, NULL-terminated means the list just keeps going until it hits aNULLand then it stops, so pls don't forget your terminator or she'll keep reading forever (and that's not a vibe). π«Ά
π DESCRIPTION π
returns the data associated with the matched entry, or NULL. π―
that's it. that's the description. no hidden lore, no extra flags, no surprises β she matches, she returns the data, she goes home. periodt. β¨
lowkey a perfect little function ngl β one arg, one return, zero drama. main character energy fr fr.
π SEE ALSO π
kernel file ./drivers/of/base.c β that's where she lives, go say hi π§
and here's the whole of crew, all the of_* besties you might wanna meet next:
of_find_all_nodes(9)__of_device_is_compatible(9)of_machine_compatible_match(9)of_machine_read_compatible(9)of_machine_read_model(9)of_machine_get_match(9)__of_device_is_available(9)__of_device_is_reserved(9)of_device_is_available(9)__of_device_is_fail(9)of_device_is_big_endian(9)of_get_parent(9)of_get_next_parent(9)of_get_next_child(9)of_get_next_child_with_prefix(9)of_get_next_available_child(9)of_get_next_reserved_child(9)of_get_next_cpu_node(9)of_get_compatible_child(9)of_get_child_by_name(9)of_get_available_child_by_name(9)of_find_node_opts_by_path(9)of_find_node_by_name(9)of_find_node_by_type(9)of_find_compatible_node(9)of_find_node_with_property(9)of_match_node(9)of_find_matching_node_and_match(9)of_alias_from_compatible(9)of_find_node_by_phandle(9)of_parse_phandle_with_args_map(9)of_count_phandle_with_args(9)__of_add_property(9)of_add_property(9)of_remove_property(9)of_alias_scan(9)of_alias_get_id(9)of_alias_get_highest_id(9)of_console_check(9)of_find_next_cache_node(9)of_find_last_cache_level(9)of_map_id(9)of_map_iommu_id(9)of_map_msi_id(9)
that's 44 whole friends, i counted, i'm obsessed ππ
okay that's the page!! tysm for reading, mwah π«Ά this one shipped out of ./drivers/of and the date on it is October 2026 β so yeah, it's literally from the future, no cap. go read some more of_*(9) pages, they miss you. bye bestie!! π
β¨ππ¦πΈπ
π¦ 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