technology: Fix technology refcounting
authorAlok Barsode <alok.barsode@linux.intel.com>
Wed, 25 Jan 2012 12:16:41 +0000 (14:16 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 31 Jan 2012 23:19:28 +0000 (00:19 +0100)
commitfc29a97acd4bcbd37ff9001e7651e54a246417ad
tree66ec83cec68e890ad4a903b38d2a3b167b36e4bb
parentaeeb2e24ab65a9b0b174231ca602b517564bdef0
technology: Fix technology refcounting

technology_add_device and technology_add_rfkill should increment
technology refcount. The refcount denotes the total number of devices
and rfkill switches in the technology. Similarly technology_remove_device
and technology_remove_rfkill should decrement technology refcount.
Once the refcount is 0, which means that there are no devices and rfkill
switches in this technology, technology should be freed.
src/technology.c