From 5b5c233e909b67482908b0f32452c7cbcd6fae0e Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 24 Apr 2020 21:31:35 -0700 Subject: device: Constify struct device * parameter to dev_name dev_name() does not need to modify the device structure. Hence, this change makes the struct device * parameter to dev_name() as const. Change-Id: I6a94394385e45fd76f68218bf57914bddd2e2121 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/40703 Reviewed-by: HAOUAS Elyes Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/device/device_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device') diff --git a/src/device/device_util.c b/src/device/device_util.c index 25e95cfa67..aa2f06a332 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -225,7 +225,7 @@ const char *dev_path(const struct device *dev) return buffer; } -const char *dev_name(struct device *dev) +const char *dev_name(const struct device *dev) { if (dev->name) return dev->name; -- cgit v1.2.3