Skip to content

Commit 70dad7c

Browse files
refactor(hw/core/qdev): inline device_class_set_parent_unrealize
1 parent ee40637 commit 70dad7c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

hw/core/qdev.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,6 @@ void device_class_set_legacy_reset(DeviceClass *dc, DeviceReset dev_reset)
795795
dc->legacy_reset = dev_reset;
796796
}
797797

798-
void device_class_set_parent_unrealize(DeviceClass *dc,
799-
DeviceUnrealize dev_unrealize,
800-
DeviceUnrealize *parent_unrealize)
801-
{
802-
*parent_unrealize = dc->unrealize;
803-
dc->unrealize = dev_unrealize;
804-
}
805-
806798
Object *qdev_get_machine(void)
807799
{
808800
static Object *dev;

include/hw/qdev-core.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,9 +995,13 @@ void device_class_set_legacy_reset(DeviceClass *dc,
995995
* (usually in the instance structure) so you can eventually call
996996
* dc->parent_unrealize(dev);
997997
*/
998-
void device_class_set_parent_unrealize(DeviceClass *dc,
998+
inline void device_class_set_parent_unrealize(DeviceClass *dc,
999999
DeviceUnrealize dev_unrealize,
1000-
DeviceUnrealize *parent_unrealize);
1000+
DeviceUnrealize *parent_unrealize)
1001+
{
1002+
*parent_unrealize = dc->unrealize;
1003+
dc->unrealize = dev_unrealize;
1004+
}
10011005

10021006
const VMStateDescription *qdev_get_vmsd(DeviceState *dev);
10031007

0 commit comments

Comments
 (0)