power_supply_put(9)
π NAME π
okay so this is the power_supply_put(9) page, bestie β straight out of the Kernel API Manual β and it's literally about dropping a reference you got with power_supply_get_by_name π
.
β¨ SYNOPSIS β¨
void power_supply_put (struct power_supply *psy );
that's the whole signature, no cap β¨
π ARGUMENTS π
psyβ Reference to put. That's the reference you're putting down, bestie. π«Ά
πΈ DESCRIPTION πΈ
okay so the vibe check here is timing: the reference to power supply should be put before unregistering the power supply. That's it. That's the whole rule. Don't be out here unregistering first and then trying to put the reference β the manual says put it before, periodt π.
careful, bestie: it says should, so this is a real timing note, not a suggestion to freestyle π«Ά
π¦ SEE ALSO π¦
- Kernel file:
./drivers/power/supply/power_supply_core.cπ power_supply_get_by_name(9)β the getter bestie that started this whole reference situationpower_supply_get_system_batteries(9)power_supply_put_system_batteries(9)power_supply_get_by_reference(9)devm_power_supply_get_by_reference(9)power_supply_temp2resist_simple(9)power_supply_vbat2ri(9)power_supply_ocv2cap_simple(9)power_supply_get_property_direct(9)power_supply_set_property_direct(9)power_supply_register(9)devm_power_supply_register(9)power_supply_unregister(9)
mwah π this page's source/version is ./drivers/power/supply, it's dated October 2026, and yes bestie, we were reading power_supply_put(9) the whole time. bye π«Άπ
π¦ 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