ssam_device_get_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 is NULL) β€” 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 πŸ‘‘:


fr fr, if you skipped straight to RETURN: she gives you the match or she gives you NULL, and NULL can 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