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 <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40703 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user