mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
cpu: Convert the methods to use a const udevice *
These functions should not modify the device. Convert them to const so that callers don't need to cast if they have a const udevice *. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <qfw.h>
|
||||
#include <asm/cpu.h>
|
||||
|
||||
int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size)
|
||||
int cpu_qemu_get_desc(const struct udevice *dev, char *buf, int size)
|
||||
{
|
||||
if (size < CPU_MAX_NAME_LEN)
|
||||
return -ENOSPC;
|
||||
@@ -20,7 +20,7 @@ int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpu_qemu_get_count(struct udevice *dev)
|
||||
static int cpu_qemu_get_count(const struct udevice *dev)
|
||||
{
|
||||
return qemu_fwcfg_online_cpus();
|
||||
}
|
||||
|
Reference in New Issue
Block a user