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:

committed by
Rafael J. Wysocki

parent
d5adbfcd5f
commit
bec84da8d1
@@ -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);
|
||||
|
Reference in New Issue
Block a user