mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +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:
@@ -379,7 +379,7 @@ static const struct bmips_cpu_hw bmips_cpu_bcm6838 = {
|
||||
};
|
||||
|
||||
/* Generic CPU Ops */
|
||||
static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
|
||||
static int bmips_cpu_get_desc(const struct udevice *dev, char *buf, int size)
|
||||
{
|
||||
struct bmips_cpu_priv *priv = dev_get_priv(dev);
|
||||
const struct bmips_cpu_hw *hw = priv->hw;
|
||||
@@ -387,7 +387,7 @@ static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
|
||||
return hw->get_cpu_desc(priv, buf, size);
|
||||
}
|
||||
|
||||
static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
|
||||
static int bmips_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
|
||||
{
|
||||
struct bmips_cpu_priv *priv = dev_get_priv(dev);
|
||||
const struct bmips_cpu_hw *hw = priv->hw;
|
||||
@@ -400,7 +400,7 @@ static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bmips_cpu_get_count(struct udevice *dev)
|
||||
static int bmips_cpu_get_count(const struct udevice *dev)
|
||||
{
|
||||
struct bmips_cpu_priv *priv = dev_get_priv(dev);
|
||||
const struct bmips_cpu_hw *hw = priv->hw;
|
||||
@@ -408,7 +408,7 @@ static int bmips_cpu_get_count(struct udevice *dev)
|
||||
return hw->get_cpu_count(priv);
|
||||
}
|
||||
|
||||
static int bmips_cpu_get_vendor(struct udevice *dev, char *buf, int size)
|
||||
static int bmips_cpu_get_vendor(const struct udevice *dev, char *buf, int size)
|
||||
{
|
||||
snprintf(buf, size, "Broadcom");
|
||||
|
||||
|
Reference in New Issue
Block a user