to_ssam_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

to_ssam_device β€” the little cast that takes your struct device and is like "you're a SSAM client device now, bestie" ✨

(oh also hi, this is the to_ssam_device(9) page from the Kernel API Manual, welcome to the group chat 🫢)


🌸 SYNOPSIS 🌸

to_ssam_device (d );

πŸŽ€ ARGUMENTS πŸŽ€

  • d β€” the device you wanna cast. That's it, that's the whole argument. She's a struct device and she's about to get a glow-up πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you have a struct device, right? and you know β€” like, you know know β€” that inside it there's a struct ssam_device just chilling, wrapped around it like a little nesting doll πŸͺ†. This function is the one that does the unboxing: it casts the given struct device into a struct ssam_device.

BUT. and this is the important part, bestie, do not skip this πŸ™ˆ β€” to_ssam_device does not check anything for you. The caller has to ensure that the given device is actually enclosed in a struct ssam_device, like, for real for real. The sanctioned way to do that vibe check is by calling is_ssam_device first ✨

it's giving "trust me bro" energy, except you are the bro being trusted, so pls be responsible πŸ’€


πŸ”₯ RETURN πŸ”₯

Returns a pointer to the struct ssam_device wrapping the given device d. slay. that's your device, now in a cuter outfit πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./include/linux/surface_aggregator/device.h, plus the whole extended universe, no cap:


πŸ’– reminder bestie: cast responsibly. run is_ssam_device first or the undefined behaviour will find you and it will not be cute πŸ’€

okay that's the whole page, ily, go forth and cast πŸ§šβ€β™€οΈβœ¨ this came from ./include/linux/surface_aggreg... and it's dated October 2026, so like, future vibes only πŸŒΈπŸ¦‹πŸ“

πŸ“¦ where this page comes from