rpmb_dev_find_device(9)
π rpmb_dev_find_device(9) β like, the whole kernel API manual vibe β¨
okay so bestie, welcome to rpmb_dev_find_device(9) β yes that's the man page name, yes it's a 9 section kernel API joint, we're in the big leagues now π
πΈ NAME πΈ
rpmb_dev_find_device β returns the first matching rpmb device. literally that's the whole personality π
β¨ SYNOPSIS β¨
struct rpmb_dev * rpmb_dev_find_device (const void *data , const struct
rpmb_dev *start , int (*match)(struct device *dev, const void *data) );
three args, one return, no drama π
π¦ ARGUMENTS π¦
dataβ the data you're handing off to the match function. it's just vibes for the matcher, ok? πstartβ the rpmb device you wanna begin with. your starting point, your main character β¨matchβ the matching function itself. this is the whole test, the vibe check, the moment of truth π₯
π DESCRIPTION π
so here's what happens, fr fr: it iterates over all the registered RPMB devices, and it calls match for each one, passing it the RPMB device and data π«Ά
the return value of match gets checked on every single call. and if it returns anything other than 0? boom β break, and return that found RPMB device. not me getting emotional over a loop π₯Ή
β οΈ okay important bestie: it's the caller's responsibility to call rpmb_dev_put on the returned device when it's done with it. do not skip this. do not ghost the refcount. that's it, that's the warning π
β RETURN β
a matching rpmb device, or NULL on failure. simple as that π
π§ SEE ALSO π§
Kernel file ./drivers/misc/rpmb-core.c, plus the whole friend group:
okay that's the page!! shoutout to ./drivers/misc for housing all of this, and to October 2026 for the timestamp β periodt, go call rpmb_dev_put, ily, bye π
π
π¦ 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