stm_find_device(9)
π stm_find_device(9) β like, the Kernel API Manual page you didn't know you needed π
okay so bestie, welcome to the glow-up of stm_find_device β it's a kernel API manual situation, and honestly? iconic. let's get into it β¨
πΈ NAME πΈ
stm_find_device β finds an stm device by name, no cap π
π¦ SYNOPSIS π¦
struct stm_device * stm_find_device (const char *buf );
π ARGUMENTS π
bufβ a character buffer holding the name you're hunting for. literally just the name, sitting in a buffer, being a vibe π«Ά
β¨ DESCRIPTION β¨
so when does this even get called? two whole situations, bestie:
- when a policy gets assigned to an stm device, or
- when an stm_source device gets linked to an stm device π
and what does it do? it grabs the device's reference (that's get_device) and the module reference. both of them. and here's the part where you gotta pay attention, because the calling path needs to make sure to drop them with stm_put_device. don't leave them hanging, that's not the move π
π₯ RETURN π₯
an stm device pointer β or null if the lookup failed π (as in, nothing found, that's a null, go home)
π SEE ALSO π
kernel file ./drivers/hwtracing/stm/core.c, plus the whole friend group:
stm_put_device(9)stm_data_write(9)stm_source_link_add(9)__stm_source_link_drop(9)stm_source_link_drop(9)stm_source_register_device(9)stm_source_unregister_device(9)
π§ sign-off π§
and that's the page!! brought to you from ./drivers/hwtracing/stm, dated October 2026 β she's giving kernel documentation but make it cute. mwah π
π
π¦ 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