Skip to content

Commit 89a216e

Browse files
committed
virtio: fix comments, readability
Fix a couple of comments to match reality. Initialize config_driver_disabled to be consistent with other fields (note: the structure is already zero initialized, so this is not a bugfix as such). Signed-off-by: Michael S. Tsirkin <[email protected]> Message-Id: <7b74a55a5f3dc066d954472f5b68c29022f11b43.1752094439.git.mst@redhat.com> Acked-by: Jason Wang <[email protected]>
1 parent 347e9f5 commit 89a216e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/virtio/virtio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ EXPORT_SYMBOL_GPL(virtio_config_changed);
147147

148148
/**
149149
* virtio_config_driver_disable - disable config change reporting by drivers
150-
* @dev: the device to reset
150+
* @dev: the device to disable
151151
*
152152
* This is only allowed to be called by a driver and disabling can't
153153
* be nested.
@@ -162,7 +162,7 @@ EXPORT_SYMBOL_GPL(virtio_config_driver_disable);
162162

163163
/**
164164
* virtio_config_driver_enable - enable config change reporting by drivers
165-
* @dev: the device to reset
165+
* @dev: the device to enable
166166
*
167167
* This is only allowed to be called by a driver and enabling can't
168168
* be nested.
@@ -530,6 +530,7 @@ int register_virtio_device(struct virtio_device *dev)
530530
goto out_ida_remove;
531531

532532
spin_lock_init(&dev->config_lock);
533+
dev->config_driver_disabled = false;
533534
dev->config_core_enabled = false;
534535
dev->config_change_pending = false;
535536

0 commit comments

Comments
 (0)