setup_destroy_sysfs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to the Kernel API Manual, section 9 β€” this is the setup_destroy_sysfs(9) page, and we're gonna make it make sense. πŸ’…βœ¨

✨ NAME ✨

setup_destroy_sysfs β€” create a kobject with the SRM bin file attached πŸŽ€

🌸 SYNOPSIS 🌸

struct kobject * setup_destroy_sysfs (struct kunit *test , struct hdcp_workqueue *work );

πŸŽ€ ARGUMENTS πŸŽ€

  • test β€” KUnit test context. It's giving test-harness business. πŸ§ͺ
  • work β€” workqueue whose attr will be registered. Yep, that whole attr situation. πŸ› οΈ

πŸ’– DESCRIPTION πŸ’–

So here's the tea: hdcp_destroy calls sysfs_remove_bin_file on the first entry's attr, which means a real kobject with the bin file created is required. No fake vibes, bestie β€” the kobject has to be legit. 😭

This function returns the kobject, and the caller must kobject_put after hdcp_destroy has run. That's the rule, fr fr.

⚠️ bestie, do not forget the kobject_put after hdcp_destroy has run β€” the caller has to handle that cleanup, periodt. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Go read these next, bestie β€” the whole squad is here. πŸ‘‘

xoxo, the Kernel API Manual πŸ’– β€” source/version ./drivers/gpu/drm/amd/display/..., dated October 2026, page setup_destroy_sysfs(9). slay. 🫢

πŸ“¦ where this page comes from