ssam_device_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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

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