diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-26 22:06:27 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-20 11:37:47 -0600 |
commit | f07e58b878fc18bd69d2c19075f0fb8d7d35da00 (patch) | |
tree | ca468b413f8eee4677bc83c4adf1c118956eacb2 /arch/x86/cpu/cpu_x86.c | |
parent | 3b9a87321cf5f40ad4c8dac535f94b0cbde19ce2 (diff) |
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/x86/cpu/cpu_x86.c')
-rw-r--r-- | arch/x86/cpu/cpu_x86.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c index 3f2ba0881e..7e83051646 100644 --- a/arch/x86/cpu/cpu_x86.c +++ b/arch/x86/cpu/cpu_x86.c @@ -26,7 +26,7 @@ int cpu_x86_bind(struct udevice *dev) return 0; } -int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size) +int cpu_x86_get_vendor(const struct udevice *dev, char *buf, int size) { const char *vendor = cpu_vendor_name(gd->arch.x86_vendor); @@ -38,7 +38,7 @@ int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size) return 0; } -int cpu_x86_get_desc(struct udevice *dev, char *buf, int size) +int cpu_x86_get_desc(const struct udevice *dev, char *buf, int size) { char *ptr; @@ -52,7 +52,7 @@ int cpu_x86_get_desc(struct udevice *dev, char *buf, int size) return 0; } -int cpu_x86_get_count(struct udevice *dev) +int cpu_x86_get_count(const struct udevice *dev) { int node, cpu; int num = 0; |