Skip to content

Commit

Permalink
Revert "virtio_config: introduce a new .enable_cbs method"
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jason Wang <[email protected]>
  • Loading branch information
mstsirkin committed Mar 30, 2022
1 parent 7414539 commit c18c868
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions include/linux/virtio_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ struct virtio_shm_region {
* any of @get/@set, @get_status/@set_status, or @get_features/
* @finalize_features are NOT safe to be called from an atomic
* context.
* @enable_cbs: enable the callbacks
* vdev: the virtio_device
* @get: read the value of a configuration field
* vdev: the virtio_device
* offset: the offset of the configuration field
Expand Down Expand Up @@ -78,7 +76,6 @@ struct virtio_shm_region {
*/
typedef void vq_callback_t(struct virtqueue *);
struct virtio_config_ops {
void (*enable_cbs)(struct virtio_device *vdev);
void (*get)(struct virtio_device *vdev, unsigned offset,
void *buf, unsigned len);
void (*set)(struct virtio_device *vdev, unsigned offset,
Expand Down Expand Up @@ -233,9 +230,6 @@ void virtio_device_ready(struct virtio_device *dev)
{
unsigned status = dev->config->get_status(dev);

if (dev->config->enable_cbs)
dev->config->enable_cbs(dev);

BUG_ON(status & VIRTIO_CONFIG_S_DRIVER_OK);
dev->config->set_status(dev, status | VIRTIO_CONFIG_S_DRIVER_OK);
}
Expand Down

0 comments on commit c18c868

Please sign in to comment.