summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/cpu_x86.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-01-26 22:06:27 -0700
committerSimon Glass <sjg@chromium.org>2020-07-25 14:46:57 -0600
commit961420fa5f3bcf837518e7f72d6f8c3ee090643d (patch)
tree45c39f46656140575aafa573299841a1ac9cab56 /arch/x86/include/asm/cpu_x86.h
parentfdc34368ddcd1d2eb46f9a1829f080f8c1760dee (diff)
downloadu-boot-961420fa5f3bcf837518e7f72d6f8c3ee090643d.tar.gz
u-boot-961420fa5f3bcf837518e7f72d6f8c3ee090643d.tar.xz
u-boot-961420fa5f3bcf837518e7f72d6f8c3ee090643d.zip
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/include/asm/cpu_x86.h')
-rw-r--r--arch/x86/include/asm/cpu_x86.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/cpu_x86.h b/arch/x86/include/asm/cpu_x86.h
index ae8f4dcd5d..4fd5f03fdc 100644
--- a/arch/x86/include/asm/cpu_x86.h
+++ b/arch/x86/include/asm/cpu_x86.h
@@ -28,7 +28,7 @@ int cpu_x86_bind(struct udevice *dev);
* @size: Size of string space
* @return: 0 if OK, -ENOSPC if buffer is too small, other -ve on error
*/
-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);
/**
* cpu_x86_get_count() - Get the number of cores for an x86 CPU
@@ -40,7 +40,7 @@ int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
* @return: Number of cores if successful,
* -ENOENT if not "/cpus" entry is found in the device tree
*/
-int cpu_x86_get_count(struct udevice *dev);
+int cpu_x86_get_count(const struct udevice *dev);
/**
* cpu_x86_get_vendor() - Get a vendor string for an x86 CPU
@@ -53,6 +53,6 @@ int cpu_x86_get_count(struct udevice *dev);
* @size: Size of string space
* @return: 0 if OK, -ENOSPC if buffer is too small, other -ve on error
*/
-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);
#endif /* _ASM_CPU_X86_H */