device: constify some variables

Change-Id: I6830a65bc9cea2907f4209bb97a53ccebcbf248d
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-on: https://review.coreboot.org/25873
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Lubomir Rintel
2018-04-26 00:00:22 +02:00
committed by Patrick Georgi
parent ecef322bf4
commit 9ba8f7c28e
4 changed files with 22 additions and 22 deletions

View File

@@ -269,7 +269,7 @@ u32 dev_path_encode(struct device *dev)
* Warning: This function uses a static buffer. Don't call it more than once
* from the same print statement!
*/
const char *dev_path(struct device *dev)
const char *dev_path(const struct device *dev)
{
static char buffer[DEVICE_PATH_MAX];
@@ -814,7 +814,7 @@ bool dev_is_active_bridge(struct device *dev)
return 0;
}
static void resource_tree(struct device *root, int debug_level, int depth)
static void resource_tree(const struct device *root, int debug_level, int depth)
{
int i = 0;
struct device *child;
@@ -846,7 +846,7 @@ static void resource_tree(struct device *root, int debug_level, int depth)
}
}
void print_resource_tree(struct device *root, int debug_level, const char *msg)
void print_resource_tree(const struct device *root, int debug_level, const char *msg)
{
/* Bail if root is null. */
if (!root) {
@@ -862,7 +862,7 @@ void print_resource_tree(struct device *root, int debug_level, const char *msg)
resource_tree(root, debug_level, 0);
}
void show_devs_tree(struct device *dev, int debug_level, int depth)
void show_devs_tree(const struct device *dev, int debug_level, int depth)
{
char depth_str[20];
int i;