aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2015-03-12 08:44:13 +0100
committerSebastian Reichel <[email protected]>2015-03-13 23:15:52 +0100
commit03e81acce5568c7105dc5bef6984c8b0edfe8d45 (patch)
tree5a23f5c2245e9d4f170e644e2050638c225b51a1 /net/lapb/lapb_iface.c
parent1a352462b5377ac68f5955d674b3460c7bac52a3 (diff)
power_supply: Increment power supply use counter when obtaining references
Increment the power_supply.use_cnt usage counter on: - power_supply_get_by_phandle() - power_supply_get_by_name() and decrement it on power_supply_put() call. This helps tracking of valid usage of power supply instance by consumers. The usage counter itself also allows safe calling of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions