[v2,3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

Message ID 20181012083008.29027-4-maozhongyi@cmss.chinamobile.com
State New
Headers show
Series
  • use object link instead of qdev property
Related show

Commit Message

Mao Zhongyi Oct. 12, 2018, 8:30 a.m.
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 hw/arm/musicpal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Oct. 12, 2018, 9:53 a.m. | #1
On 12/10/2018 10:30, Mao Zhongyi wrote:
> Cc: Jan Kiszka <jan.kiszka@web.de>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> To: qemu-arm@nongnu.org
> 
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/arm/musicpal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
> index ac266f9253..9648b3af44 100644
> --- a/hw/arm/musicpal.c
> +++ b/hw/arm/musicpal.c
> @@ -1693,7 +1693,7 @@ static void musicpal_init(MachineState *machine)
>      }
>  
>      wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
> -    dev = qdev_create(NULL, "mv88w8618_audio");
> +    dev = qdev_create(NULL, TYPE_MV88W8618_AUDIO);
>      s = SYS_BUS_DEVICE(dev);
>      object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev),
>                               TYPE_WM8750, NULL);
>
Mao Zhongyi Oct. 12, 2018, 9:58 a.m. | #2
Sorry for the noise, there is something wrong with this patch,
I will fix it and resend this patchset.

Thanks,
Mao

On 10/12/18 4:30 PM, Mao Zhongyi wrote:
> Cc: Jan Kiszka <jan.kiszka@web.de>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> To: qemu-arm@nongnu.org
> 
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
>   hw/arm/musicpal.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
> index ac266f9253..9648b3af44 100644
> --- a/hw/arm/musicpal.c
> +++ b/hw/arm/musicpal.c
> @@ -1693,7 +1693,7 @@ static void musicpal_init(MachineState *machine)
>       }
>   
>       wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
> -    dev = qdev_create(NULL, "mv88w8618_audio");
> +    dev = qdev_create(NULL, TYPE_MV88W8618_AUDIO);
>       s = SYS_BUS_DEVICE(dev);
>       object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev),
>                                TYPE_WM8750, NULL);
>

Patch

diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index ac266f9253..9648b3af44 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -1693,7 +1693,7 @@  static void musicpal_init(MachineState *machine)
     }
 
     wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
-    dev = qdev_create(NULL, "mv88w8618_audio");
+    dev = qdev_create(NULL, TYPE_MV88W8618_AUDIO);
     s = SYS_BUS_DEVICE(dev);
     object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev),
                              TYPE_WM8750, NULL);