Skip to content

Commit

Permalink
scsi: Cleanup not used anymore SCSIBusInfo{hotplug, hot_unplug} fields
Browse files Browse the repository at this point in the history
SCSI subsytem was converted to hotplug handler API and
doesn't use SCSIBusInfo{hotplug, hot_unplug} fields and
related callbacks anymore.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
  • Loading branch information
Igor Mammedov authored and afaerber committed Oct 15, 2014
1 parent 02206e5 commit 10bdcd5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
16 changes: 0 additions & 16 deletions hw/scsi/scsi-bus.c
Expand Up @@ -208,10 +208,6 @@ static void scsi_qdev_realize(DeviceState *qdev, Error **errp)
}
dev->vmsentry = qemu_add_vm_change_state_handler(scsi_dma_restart_cb,
dev);

if (bus->info->hotplug) {
bus->info->hotplug(bus, dev);
}
}

static void scsi_qdev_unrealize(DeviceState *qdev, Error **errp)
Expand Down Expand Up @@ -1943,17 +1939,6 @@ static int get_scsi_requests(QEMUFile *f, void *pv, size_t size)
return 0;
}

static int scsi_qdev_unplug(DeviceState *qdev)
{
SCSIDevice *dev = SCSI_DEVICE(qdev);
SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, dev->qdev.parent_bus);

if (bus->info->hot_unplug) {
bus->info->hot_unplug(bus, dev);
}
return qdev_simple_unplug_cb(qdev);
}

static const VMStateInfo vmstate_info_scsi_requests = {
.name = "scsi-requests",
.get = get_scsi_requests,
Expand Down Expand Up @@ -2017,7 +2002,6 @@ static void scsi_device_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
k->bus_type = TYPE_SCSI_BUS;
k->realize = scsi_qdev_realize;
k->unplug = scsi_qdev_unplug;
k->unrealize = scsi_qdev_unrealize;
k->props = scsi_props;
}
Expand Down
2 changes: 0 additions & 2 deletions include/hw/scsi/scsi.h
Expand Up @@ -146,8 +146,6 @@ struct SCSIBusInfo {
void (*transfer_data)(SCSIRequest *req, uint32_t arg);
void (*complete)(SCSIRequest *req, uint32_t arg, size_t resid);
void (*cancel)(SCSIRequest *req);
void (*hotplug)(SCSIBus *bus, SCSIDevice *dev);
void (*hot_unplug)(SCSIBus *bus, SCSIDevice *dev);
void (*change)(SCSIBus *bus, SCSIDevice *dev, SCSISense sense);
QEMUSGList *(*get_sg_list)(SCSIRequest *req);

Expand Down

0 comments on commit 10bdcd5

Please sign in to comment.