ssam_device_get_match_data(9)
πΈ 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 isNULL), - 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 π
- Kernel file
./drivers/platform/surface/aggregator/bus.c 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(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)
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
- 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