to_ssam_device(9)
π 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 astruct deviceand 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:
enum ssam_device_domain(9)enum ssam_virtual_tc(9)struct ssam_device_uid(9)SSAM_DEVICE(9)SSAM_VDEV(9)SSAM_SDEV(9)struct ssam_device(9)struct ssam_device_driver(9)is_ssam_device(9)to_ssam_device_driver(9)ssam_device_mark_hot_removed(9)ssam_device_is_hot_removed(9)ssam_device_get(9)ssam_device_put(9)ssam_device_get_drvdata(9)ssam_device_set_drvdata(9)ssam_device_driver_register(9)module_ssam_device_driver(9)ssam_register_clients(9)ssam_device_register_clients(9)SSAM_DEFINE_SYNC_REQUEST_CL_N(9)SSAM_DEFINE_SYNC_REQUEST_CL_W(9)SSAM_DEFINE_SYNC_REQUEST_CL_R(9)SSAM_DEFINE_SYNC_REQUEST_CL_WR(9)ssam_device_notifier_register(9)ssam_device_notifier_unregister(9)
π 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
- 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