diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-26 22:06:27 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-25 14:46:57 -0600 |
commit | 961420fa5f3bcf837518e7f72d6f8c3ee090643d (patch) | |
tree | 45c39f46656140575aafa573299841a1ac9cab56 /arch/nios2 | |
parent | fdc34368ddcd1d2eb46f9a1829f080f8c1760dee (diff) | |
download | u-boot-961420fa5f3bcf837518e7f72d6f8c3ee090643d.tar.gz |
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>
Diffstat (limited to 'arch/nios2')
-rw-r--r-- | arch/nios2/cpu/cpu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index 7f5e731a0f5..e7ca9882fc5 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -79,7 +79,8 @@ int arch_cpu_init_dm(void) return 0; } -static int altera_nios2_get_desc(struct udevice *dev, char *buf, int size) +static int altera_nios2_get_desc(const struct udevice *dev, char *buf, + int size) { const char *cpu_name = "Nios-II"; @@ -90,7 +91,8 @@ static int altera_nios2_get_desc(struct udevice *dev, char *buf, int size) return 0; } -static int altera_nios2_get_info(struct udevice *dev, struct cpu_info *info) +static int altera_nios2_get_info(const struct udevice *dev, + struct cpu_info *info) { info->cpu_freq = gd->cpu_clk; info->features = (1 << CPU_FEAT_L1_CACHE) | @@ -99,7 +101,7 @@ static int altera_nios2_get_info(struct udevice *dev, struct cpu_info *info) return 0; } -static int altera_nios2_get_count(struct udevice *dev) +static int altera_nios2_get_count(const struct udevice *dev) { return 1; } |