mirror of https://github.com/xemu-project/xemu.git
hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus()
The structure is accessed read-only by qdev_get_parent_bus(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230212224730.51438-2-philmd@linaro.org>
This commit is contained in:
parent
12a51d983d
commit
2d2f2507c6
|
@ -330,7 +330,7 @@ bool qdev_machine_modified(void)
|
||||||
return qdev_hot_added || qdev_hot_removed;
|
return qdev_hot_added || qdev_hot_removed;
|
||||||
}
|
}
|
||||||
|
|
||||||
BusState *qdev_get_parent_bus(DeviceState *dev)
|
BusState *qdev_get_parent_bus(const DeviceState *dev)
|
||||||
{
|
{
|
||||||
return dev->parent_bus;
|
return dev->parent_bus;
|
||||||
}
|
}
|
||||||
|
|
|
@ -715,7 +715,7 @@ static inline void qdev_init_gpio_in_named(DeviceState *dev,
|
||||||
void qdev_pass_gpios(DeviceState *dev, DeviceState *container,
|
void qdev_pass_gpios(DeviceState *dev, DeviceState *container,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
BusState *qdev_get_parent_bus(DeviceState *dev);
|
BusState *qdev_get_parent_bus(const DeviceState *dev);
|
||||||
|
|
||||||
/*** BUS API. ***/
|
/*** BUS API. ***/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue