ssam_device_get_match(9)
π ssam_device_get_match β the Kernel API Manual glow-up
okay so picture this: you're deep in the Kernel API Manual and you need to know which entry in a driver's ID table actually matches your device. that's literally this function. she's the finder. the matcher. the main character of match tables π
β¨ NAME β¨
ssam_device_get_match β find and return the ID that matches the device inside the ID table of the bound driver π
πΈ SYNOPSIS πΈ
const struct ssam_device_id * ssam_device_get_match (const struct ssam_device *dev );
like yes bestie, that's the whole signature, keep it as-is π«Ά
π¦ ARGUMENTS π¦
devβ the device you want the matching ID table entry for. that's it. that's the whole vibe check she needs β¨
π DESCRIPTION π
so what she does: she looks through the ID table of whatever driver is currently bound to this device, hunts down the first match for the device's UID, and hands it right back to you π₯
and when does she give you NULL instead of a cute little struct pointer? three very specific situations, no cap:
- the device doesn't have a driver bound to it at all π
- the driver doesn't have a
match_table(i.e. it isNULL) β she can't search what isn't there π - there's just... no match in the driver's
match_table. nothing. zero. π
lowkey the whole thing is essentially a wrapper: this function calls ssam_device_id_match with the ID table of the bound device driver and the UID of the device. that's the tea β
β RETURN β
she returns the first match for the UID of the device in the device driver's match table π β or NULL if no such match could be found. simple as that, periodt π
π SEE ALSO π
the kernel file herself:
./drivers/platform/surface/aggregator/bus.c
and the whole friend group, all of them, no one left behind π:
ssam_device_alloc(9)ssam_device_add(9)ssam_device_remove(9)ssam_device_id_compatible(9)ssam_device_id_is_null(9)ssam_device_id_match(9)ssam_device_get_match_data(9)__ssam_device_driver_register(9)ssam_device_driver_unregister(9)ssam_bus_register(9)ssam_bus_unregister(9)__ssam_register_clients(9)ssam_remove_clients(9)
fr fr, if you skipped straight to RETURN: she gives you the match or she gives youNULL, andNULLcan mean three different things, so check your driver binding bestie π
and that's the page!! sourced straight from ./drivers/platform/surface/agg... (you know the path, it's the aggregator one π), October 2026 edition, and yes the whole thing is filed under ssam_device_get_match(9) β mwah, stan her, 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