Reviewed-by: Glenn Miles <[email protected]>

Thanks,

Glenn

On Fri, 2026-11-06 at 12:04 +0100, Markus Armbruster wrote:
> According to object.h, direct usage of DECLARE_INSTANCE_CHECKERS()
> should be avoided, and the complete OBJECT_DECLARE_TYPE macro is
> recommended instead.  So use that.
> 
> Signed-off-by: Markus Armbruster <[email protected]>
> ---
>  hw/gpio/pca9554.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/gpio/pca9554.c b/hw/gpio/pca9554.c
> index e5a1932c89..caa73f63c9 100644
> --- a/hw/gpio/pca9554.c
> +++ b/hw/gpio/pca9554.c
> @@ -22,14 +22,12 @@
>  #include "trace.h"
>  #include "qom/object.h"
>  
> -typedef struct PCA9554State PCA9554State;
> -DECLARE_INSTANCE_CHECKER(PCA9554State, PCA9554,
> -                         TYPE_PCA9554)
> -
>  #define PCA9554_NR_REGS 4
>  #define PCA9554_PIN_COUNT 8
>  #define PCA9536_PIN_COUNT 4
>  
> +OBJECT_DECLARE_TYPE(PCA9554State, PCA9554Class, PCA9554)
> +
>  struct PCA9554State {
>      /*< private >*/
>      I2CSlave i2c;
> @@ -52,10 +50,6 @@ struct PCA9554Class {
>  
>      uint8_t pin_count;
>  };
> -typedef struct PCA9554Class PCA9554Class;
> -
> -DECLARE_CLASS_CHECKERS(PCA9554Class, PCA9554,
> -                       TYPE_PCA9554)
>  
>  #define PCA9554_PIN_LOW  0x0
>  #define PCA9554_PIN_HIZ  0x1


Reply via email to