ssam_device_get_match_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 ssam_device_get_match_data β€” from the Kernel API Manual 🌸

okay so bestie, this page is from the Kernel API Manual and it's literally all about ssam_device_get_match_data(9) β€” the way that a tiny function can carry so much responsibility is iconic, honestly.


✨ NAME ✨

Find the ID that matches the device in the bound driver's ID table, then return its driver_data member. That's the whole vibe. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

const void * ssam_device_get_match_data (const struct ssam_device *dev);

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you want the match data for. That's it. That's the whole argument. slay.

πŸ’– DESCRIPTION πŸ’–

So here's the tea: this function finds the first match for the device's UID in the ID table of the corresponding driver, and then returns its driver_data. 🫢

But bestie, it returns NULL in so many situations, and you need to know them all:

  • the device does not have a driver bound to it,
  • the driver does not have match_table (i.e., it is NULL),
  • there is no match in the driver's match_table, or
  • the match does not have any driver_data.
lowkey important: any one of those and you're getting NULL back. no cap. 😭

This function essentially calls ssam_device_get_match and, if any match could be found, returns its struct ssam_device_id.driver_data member. it's giving "middle management" but in a cute way. 🌈


⭐ RETURN ⭐

Returns the driver data associated with 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. that's it. that's the return. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

like, go read those too if you want the full lore. iykyk. 🧚


and that's the page, bestie! source is ./drivers/platform/surface/agg..., version from October 2026, and the manual is ssam_device_get_match_data(9). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from