@@ -520,7 +520,7 @@ static int hda_audio_init(HDACodecDevice *hda, const
struct desc_codec *desc)
return 0;
}
-static int hda_audio_exit(HDACodecDevice *hda)
+static void hda_audio_exit(HDACodecDevice *hda)
{
HDAAudioState *a = HDA_AUDIO(hda);
HDAAudioStream *st;
@@ -539,7 +539,6 @@ static int hda_audio_exit(HDACodecDevice *hda)
}
}
AUD_remove_card(&a->card);
- return 0;
}
static int hda_audio_post_load(void *opaque, int version)
@@ -66,7 +66,7 @@ static int hda_codec_dev_init(DeviceState *qdev)
return cdc->init(dev);
}
-static int hda_codec_dev_exit(DeviceState *qdev)
+static void hda_codec_dev_exit(DeviceState *qdev)
{
HDACodecDevice *dev = DO_UPCAST(HDACodecDevice, qdev, qdev);
HDACodecDeviceClass *cdc = HDA_CODEC_DEVICE_GET_CLASS(dev);
@@ -74,7 +74,6 @@ static int hda_codec_dev_exit(DeviceState *qdev)
if (cdc->exit) {
cdc->exit(dev);
}
- return 0;
}
HDACodecDevice *hda_codec_find(HDACodecBus *bus, uint32_t cad)
@@ -38,7 +38,7 @@ typedef struct HDACodecDeviceClass
DeviceClass parent_class;
int (*init)(HDACodecDevice *dev);
- int (*exit)(HDACodecDevice *dev);
+ void (*exit)(HDACodecDevice *dev);
void (*command)(HDACodecDevice *dev, uint32_t nid, uint32_t data);
void (*stream)(HDACodecDevice *dev, uint32_t stnr, bool running, bool
output);
} HDACodecDeviceClass;
@@ -30,7 +30,7 @@ typedef enum DeviceCategory {
} DeviceCategory;
typedef int (*qdev_initfn)(DeviceState *dev);
-typedef int (*qdev_event)(DeviceState *dev);
+typedef void (*qdev_event)(DeviceState *dev);
typedef void (*qdev_resetfn)(DeviceState *dev);
typedef void (*DeviceRealize)(DeviceState *dev, Error **errp);
typedef void (*DeviceUnrealize)(DeviceState *dev, Error **errp);
This changes is required because the return type of exit(error) function is not used. This patch only has changes for files in hw/audio package. Signed-off-by: Nutan Shinde <nutanshinde1992@gmail.com> --- hw/audio/hda-codec.c | 3 +-- hw/audio/intel-hda.c | 3 +-- hw/audio/intel-hda.h | 2 +- include/hw/qdev-core.h | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) -- 1.9.1