device property: allow to constify properties

There is no reason why statically defined properties should be modifiable,
so let's make device_add_properties() and the rest of pset_*() functions to
take const pointers to properties.

This will allow us to mark properties as const/__initconst at definition
sites.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Dmitry Torokhov
2017-02-02 17:41:25 -08:00
committed by Rafael J. Wysocki
parent d5adbfcd5f
commit bec84da8d1
2 changed files with 22 additions and 21 deletions

View File

@@ -242,7 +242,7 @@ struct property_entry {
}
int device_add_properties(struct device *dev,
struct property_entry *properties);
const struct property_entry *properties);
void device_remove_properties(struct device *dev);
bool device_dma_supported(struct device *dev);