[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 12/30] qdev: add simple/generic unplug callback
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 12/30] qdev: add simple/generic unplug callback for HotplugHandler |
Date: |
Wed, 24 Sep 2014 14:17:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Il 24/09/2014 13:48, Igor Mammedov ha scritto:
> it will be used in shallow conversion from legacy hotplug
> mechanism and eventually replace all the uses of old mechanism
> DeviceClass->unplug = qdev_simple_unplug_cb()
>
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> hw/core/qdev.c | 5 +++++
> include/hw/qdev-core.h | 2 ++
> 2 files changed, 7 insertions(+)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index c89d781..1d1b113 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -286,6 +286,11 @@ int qdev_simple_unplug_cb(DeviceState *dev)
> return 0;
> }
>
> +void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
> + DeviceState *dev, Error **errp)
> +{
> + qdev_simple_unplug_cb(dev);
> +}
>
> /* Like qdev_init(), but terminate program via error_report() instead of
> returning an error value. This is okay during machine creation.
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index 48a96d2..ba812c5 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -265,6 +265,8 @@ void qdev_set_legacy_instance_id(DeviceState *dev, int
> alias_id,
> int required_for_version);
> void qdev_unplug(DeviceState *dev, Error **errp);
> int qdev_simple_unplug_cb(DeviceState *dev);
> +void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
> + DeviceState *dev, Error **errp);
> void qdev_machine_creation_done(void);
> bool qdev_machine_modified(void);
>
>
Reviewed-by: Paolo Bonzini <address@hidden>
- [Qemu-devel] [PATCH 07/30] test: usb: generic usb device hotplug, (continued)
- [Qemu-devel] [PATCH 07/30] test: usb: generic usb device hotplug, Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 08/30] test: usb: usb-storage hotplug test, Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 09/30] access BusState.allow_hotplug using wraper qbus_is_hotpluggable(), Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 10/30] qdev: HotplugHandler: rename unplug callback to unplug_request, Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported, Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 12/30] qdev: add simple/generic unplug callback for HotplugHandler, Igor Mammedov, 2014/09/24
- Re: [Qemu-devel] [PATCH 12/30] qdev: add simple/generic unplug callback for HotplugHandler,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 14/30] target-i386: ICC bus: replace BusState.allow_hotplug with hotplug_handler, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 15/30] virtio-pci: replace BusState.allow_hotplug with hotplug_handler, Igor Mammedov, 2014/09/24