I realized that in patch for ACPI battery I created perfect example of=20
self-destructing sysfs attributes. Basically, on every access to battery=20
properties we check battery status. If ACPI reports battery not present, we=
=20
remove sysfs power_supply object. I.e.
=2D> user space queries e.g. .../PNP0C0A:00/power_supply/BAT1/energy_now
-> call acpi_battery_update
-> battery gone
-> call power_supply_unregister(.../PNP0C0A:00/power_supply)
I remember discussion about this but am not sure what final outcome is. So=
=20
questions
=2D is it legal in this form?
=2D what is the proper way to manage such situation?
=2D if I move (de-)registering of power_supply out of acpi_battery_update, =
is=20
extra locking (refcounting) required to keep attributes alive or sysfs will=
=20
ensure this?
TIA
=2Dandrey| Linus Torvalds | Linux 2.6.27-rc5 |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Trent Piepho | Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| Christoph Hellwig | Re: [PATCH 06/32] IGET: Mark iget() and read_inode() as being obsolete [try #2] |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
