[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/40] lasips2: remove legacy lasips2_initfn() function
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 14/40] lasips2: remove legacy lasips2_initfn() function |
Date: |
Wed, 29 Jun 2022 13:40:00 +0100 |
There is only one user of the legacy lasips2_initfn() function which is in
machine_hppa_init(), so inline its functionality into machine_hppa_init() and
then remove it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/hppa/machine.c | 6 ++++--
hw/input/lasips2.c | 12 ------------
include/hw/input/lasips2.h | 2 --
3 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 6080037cf1..e53d5f0fa7 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -280,8 +280,10 @@ static void machine_hppa_init(MachineState *machine)
}
/* PS/2 Keyboard/Mouse */
- dev = DEVICE(lasips2_initfn(qdev_get_gpio_in(lasi_dev,
- LASI_IRQ_PS2KBD_HPA)));
+ dev = qdev_new(TYPE_LASIPS2);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0,
+ qdev_get_gpio_in(lasi_dev, LASI_IRQ_PS2KBD_HPA));
memory_region_add_subregion(addr_space, LASI_PS2KBD_HPA,
sysbus_mmio_get_region(SYS_BUS_DEVICE(dev),
0));
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index 40f77baf3e..48237816a3 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -255,18 +255,6 @@ static void lasips2_set_mouse_irq(void *opaque, int n, int
level)
lasips2_update_irq(port->parent);
}
-LASIPS2State *lasips2_initfn(qemu_irq irq)
-{
- DeviceState *dev;
-
- dev = qdev_new(TYPE_LASIPS2);
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-
- sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
-
- return LASIPS2(dev);
-}
-
static void lasips2_realize(DeviceState *dev, Error **errp)
{
LASIPS2State *s = LASIPS2(dev);
diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h
index f051c970f0..868c5521d7 100644
--- a/include/hw/input/lasips2.h
+++ b/include/hw/input/lasips2.h
@@ -47,6 +47,4 @@ struct LASIPS2State {
#define TYPE_LASIPS2 "lasips2"
OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2State, LASIPS2)
-LASIPS2State *lasips2_initfn(qemu_irq irq);
-
#endif /* HW_INPUT_LASIPS2_H */
--
2.30.2
- [PATCH 05/40] pl050: introduce new PL050_MOUSE_DEVICE QOM type, (continued)
- [PATCH 05/40] pl050: introduce new PL050_MOUSE_DEVICE QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 08/40] pl050: introduce pl050_kbd_class_init() and pl050_kbd_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 11/40] pl050: don't use legacy ps2_mouse_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 03/40] pl050: change PL050State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/06/29
- [PATCH 04/40] pl050: introduce new PL050_KBD_DEVICE QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 07/40] pl050: introduce PL050DeviceClass for the PL050 device, Mark Cave-Ayland, 2022/06/29
- [PATCH 02/40] pl050: rename pl050_keyboard_init() to pl050_kbd_init(), Mark Cave-Ayland, 2022/06/29
- [PATCH 09/40] pl050: introduce pl050_mouse_class_init() and pl050_mouse_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 12/40] lasips2: don't use vmstate_register() in lasips2_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 13/40] lasips2: remove the qdev base property and the lasips2_properties array, Mark Cave-Ayland, 2022/06/29
- [PATCH 14/40] lasips2: remove legacy lasips2_initfn() function,
Mark Cave-Ayland <=
- [PATCH 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/06/29
- [PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 16/40] lasips2: QOMify LASIPS2Port, Mark Cave-Ayland, 2022/06/29
- [PATCH 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 19/40] lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 18/40] lasips2: introduce new LASIPS2_MOUSE_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 20/40] lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 21/40] lasips2: introduce lasips2_kbd_port_class_init() and lasips2_kbd_port_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 23/40] lasips2: rename LASIPS2Port irq field to birq, Mark Cave-Ayland, 2022/06/29
- [PATCH 22/40] lasips2: introduce lasips2_mouse_port_class_init() and lasips2_mouse_port_realize(), Mark Cave-Ayland, 2022/06/29