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:
parent
26b1651f0c
commit
9a81ffa7ad
2 changed files with 2 additions and 2 deletions
|
@ -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.
|
* @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
|
* @brief Device Power Management APIs
|
||||||
|
|
|
@ -66,7 +66,7 @@ void _sys_device_do_config_level(int level)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct device *device_get_binding(char *name)
|
struct device *device_get_binding(const char *name)
|
||||||
{
|
{
|
||||||
struct device *info;
|
struct device *info;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue