From 426f53de9c2110b6c2a05fdc1a89f2e0c1a0b97e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 17 Jun 2021 13:53:21 +0200 Subject: [PATCH] hw/input/lm832x: Define TYPE_LM8323 in public header MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Define TYPE_LM8323 in the public "hw/input/lm832x.h" header and use it in hw/arm/nseries.c. Reviewed-by: Richard Henderson Acked-by: Corey Minyard Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Corey Minyard --- hw/arm/nseries.c | 2 +- hw/input/lm832x.c | 1 - include/hw/input/lm832x.h | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 92b6756fbc..906c915df7 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -417,7 +417,7 @@ static void n810_kbd_setup(struct n800_s *s) /* Attach the LM8322 keyboard to the I2C bus, * should happen in n8x0_i2c_setup and s->kbd be initialised here. */ s->kbd = DEVICE(i2c_slave_create_simple(omap_i2c_bus(s->mpu->i2c[0]), - "lm8323", N810_LM8323_ADDR)); + TYPE_LM8323, N810_LM8323_ADDR)); qdev_connect_gpio_out(s->kbd, 0, kbd_irq); } diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c index d2b92b457e..19a646d9bb 100644 --- a/hw/input/lm832x.c +++ b/hw/input/lm832x.c @@ -28,7 +28,6 @@ #include "ui/console.h" #include "qom/object.h" -#define TYPE_LM8323 "lm8323" OBJECT_DECLARE_SIMPLE_TYPE(LM823KbdState, LM8323) struct LM823KbdState { diff --git a/include/hw/input/lm832x.h b/include/hw/input/lm832x.h index f47e579ff9..2a58ccf891 100644 --- a/include/hw/input/lm832x.h +++ b/include/hw/input/lm832x.h @@ -21,6 +21,8 @@ #ifndef HW_INPUT_LM832X #define HW_INPUT_LM832X +#define TYPE_LM8323 "lm8323" + void lm832x_key_event(DeviceState *dev, int key, int state); #endif -- 2.11.0