diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2015-11-30 17:11:37 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-12-07 02:29:23 +0100 |
commit | 13141e1cb842ad6286c1cfa9a6b7c1577478d03b (patch) | |
tree | 1d0d58f00e8d6b4daa2c0c1f767e8c5b0a7d3ccd /include | |
parent | 362c0b30249e8639489b428ff5acc4a9d81c087f (diff) | |
download | linux-13141e1cb842ad6286c1cfa9a6b7c1577478d03b.tar.gz linux-13141e1cb842ad6286c1cfa9a6b7c1577478d03b.tar.bz2 linux-13141e1cb842ad6286c1cfa9a6b7c1577478d03b.zip |
device property: Take a copy of the property set
It is convenient if the property set associated with the device secondary
firmware node is a copy of the original. This allows passing property set
from a stack for example for devices created dynamically. This also ties
the property set lifetime to the associated device.
Because of that we provide new function device_remove_property_set() that
is used to disassociate and release memory allocated for the property set.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/property.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/property.h b/include/linux/property.h index d1cf2084c648..3a8c7d7773e6 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -240,7 +240,8 @@ struct property_set { struct property_entry *properties; }; -void device_add_property_set(struct device *dev, struct property_set *pset); +int device_add_property_set(struct device *dev, const struct property_set *pset); +void device_remove_property_set(struct device *dev); bool device_dma_supported(struct device *dev); |