device: Make device_get_binding() const correct

Currently passing a constant string (other than a string
literal) to device_get_binding() generates a spurious warning.
The warning is spurious because device_get_binding() does not,
nor is it ever likely to, modify its argument. To fix the
warning we modify the prototype to make clear name will never
be modified.

Change-Id: I2df22de61eb2580b2086a685549900d7ed4a322d
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
This commit is contained in:
Daniel Thompson 2016-09-28 12:11:14 -07:00 committed by Benjamin Walsh
commit 9a81ffa7ad
2 changed files with 2 additions and 2 deletions

View file

@ -419,7 +419,7 @@ void _sys_device_do_config_level(int level);
*
* @return pointer to device structure; NULL if not found or cannot be used.
*/
struct device* device_get_binding(char *name);
struct device *device_get_binding(const char *name);
/**
* @brief Device Power Management APIs