Skip to content

Commit c18c868

Browse files
committed
Revert "virtio_config: introduce a new .enable_cbs method"
This reverts commit d50497e. The new callback ended up not being used, and it's asymmetrical: just enable, no disable. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
1 parent 7414539 commit c18c868

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

include/linux/virtio_config.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ struct virtio_shm_region {
2323
* any of @get/@set, @get_status/@set_status, or @get_features/
2424
* @finalize_features are NOT safe to be called from an atomic
2525
* context.
26-
* @enable_cbs: enable the callbacks
27-
* vdev: the virtio_device
2826
* @get: read the value of a configuration field
2927
* vdev: the virtio_device
3028
* offset: the offset of the configuration field
@@ -78,7 +76,6 @@ struct virtio_shm_region {
7876
*/
7977
typedef void vq_callback_t(struct virtqueue *);
8078
struct virtio_config_ops {
81-
void (*enable_cbs)(struct virtio_device *vdev);
8279
void (*get)(struct virtio_device *vdev, unsigned offset,
8380
void *buf, unsigned len);
8481
void (*set)(struct virtio_device *vdev, unsigned offset,
@@ -233,9 +230,6 @@ void virtio_device_ready(struct virtio_device *dev)
233230
{
234231
unsigned status = dev->config->get_status(dev);
235232

236-
if (dev->config->enable_cbs)
237-
dev->config->enable_cbs(dev);
238-
239233
BUG_ON(status & VIRTIO_CONFIG_S_DRIVER_OK);
240234
dev->config->set_status(dev, status | VIRTIO_CONFIG_S_DRIVER_OK);
241235
}

0 commit comments

Comments
 (0)