pm_clk_destroy(9)
π pm_clk_destroy(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual (that's the manual name, iykyk) and it's all about pm_clk_destroy β one little function with main character energy. Let's get into it π
β¨ NAME β¨
pm_clk_destroy β literally destroys a device's list of power management clocks. no cap, that's the whole vibe check π«Ά
πΈ SYNOPSIS πΈ
void pm_clk_destroy (struct device *dev );
that's it. that's the signature. it returns void, so it gives you nothing back emotionally except closure π
π¦ ARGUMENTS π¦
devβ the Device whose list of PM clocks you're about to destroy. it's dev. it's the main character here. you hand it over and the list gets cleared out π
π DESCRIPTION π
so here's the tea, bestie π this function does three things and it does them in order:
- it clears the dev's
power.subsys_datafield β like, that field? empty now. - it removes the list of clock entries from the
struct pm_subsys_dataobject that field was pointing to. all the clock entries? gone. from that object? yes. - it frees that object β
struct pm_subsys_data? bye bestie, free'd.
the way that it just clears, removes, and frees π§ iconic behaviour, honestly.
β οΈ heads up: the original phrasing is "before and free that object" β so the removing of clock entries happens before the freeing. order matters, don't come for me π₯
π SEE ALSO π
all the sibling functions in the same little friend group β go say hi π
- Kernel file
./drivers/base/power/clock_ops.cπ (that's where all these live) pm_clk_list_lock(9)pm_clk_list_unlock(9)pm_clk_op_lock(9)pm_clk_op_unlock(9)__pm_clk_enable(9)pm_clk_acquire(9)pm_clk_add(9)pm_clk_add_clk(9)of_pm_clk_add_clks(9)__pm_clk_remove(9)pm_clk_remove_clk(9)pm_clk_init(9)pm_clk_create(9)pm_clk_suspend(9)pm_clk_resume(9)pm_clk_notify(9)enable_clock(9)disable_clock(9)pm_clk_notify(9)β yes it's listed again, and honestly? she said it twice because she meant it πβ¨pm_clk_add_notifier(9)
and that's the whole page, bestie!! π₯³ a cute lil sign-off for you: this one comes courtesy of ./drivers/base/power β the source/version corner of the page β and it's dated October 2026, so it's basically from the future π« periodt. π
π¦ 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