ssam_device_alloc(9)
π ssam_device_alloc β from the Kernel API Manual (section 9), bestie β¨
okay so picture this: you're deep in the kernel, you need a shiny new SSAM client device, and this is the function that hands it to you. no cap.
β¨ SYNOPSIS β¨
struct ssam_device * ssam_device_alloc (struct ssam_controller *ctrl ,
struct ssam_device_uid uid );
like, two args, one pointer out. simple. iconic. π
πΈ ARGUMENTS πΈ
ctrlβ the controller that this device is gonna live under. that's its whole home situation πuidβ the UID of the device you're adding. it's literally the device's name tag π«Ά
π DESCRIPTION π
so what it does is allocate and initialize a brand-new client device. fresh out the box, bestie β¨
The parent of the device gets set to the controller device, and the name gets set based on the UID. cute, right?
β οΈ but listen β the device still has to be added via ssam_device_add. allocating it is not the same as adding it. you gotta go read that function for the deets, fr fr. don't skip it π
π RETURN π
Returns the newly allocated and initialized SSAM client device π
or, if it could not be allocated, NULL. yeah. sad girl hours π always check for the NULL, okay?
π SEE ALSO π
Kernel file ./drivers/platform/surface/aggregator/bus.c
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_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)
that's the whole friend group, they all hang out together π¦
and that's the page!! mwah π this one came from ./drivers/platform/surface/agg... and it's dated October 2026 β so like, future slay β go forth and allocate responsibly, bestie π§π
π¦ 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