lwmi_debugfs_create_dir(9)
β¨ NAME β¨
okay so bestie, this is lwmi_debugfs_create_dir(9) from the Kernel API Manual, and it's literally the helper function for creating a debugfs directory for a device πβ¨. That's the whole vibe: you got a device, you want a debugfs dir for it, this function is your girl.
π¦ SYNOPSIS π¦
struct dentry * lwmi_debugfs_create_dir (struct wmi_device *wdev );
Exact signature, no cap.
π ARGUMENTS π
wdevβ pointer to the WMI device to be called π. That's the device you're handing over.
πΈ DESCRIPTION πΈ
So here's the important part, bestie: the caller must remove the directory with debugfs_remove_recursive on device removal π. Like, don't just create it and ghost it β cleanup is mandatory, fr fr. This function makes the directory, but you own the teardown.
not me reminding you that debugfs_remove_recursive is the required cleanup on device removal π please don't skip it.
π₯ RETURN π₯
It returns a pointer to the created directory π«Άβ¨. That's it β pointer to the directory it just made.
π SEE ALSO π
- Kernel file
./drivers/platform/x86/lenovo/wmi-helpers.cπ lwmi_dev_evaluate_int(9)lwmi_tm_register_notifier(9)lwmi_tm_unregister_notifier(9)devm_lwmi_tm_unregister_notifier(9)devm_lwmi_tm_register_notifier(9)lwmi_tm_notifier_call(9)
kisses, this iconic page comes from source ./drivers/platform/x86/lenovo, dated October 2026, and it's serving lwmi_debugfs_create_dir(9) energy πππ
π¦ 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