Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f957d1f0 authored by Rusty Russell's avatar Rusty Russell
Browse files

virtio: configuration change callback



Various drivers want to know when their configuration information
changes: the balloon driver is the immediate user, but the network
driver may one day have a "carrier" status as well.

This introduces that callback (lguest doesn't use it yet).

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 18445c4d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -98,12 +98,15 @@ void unregister_virtio_device(struct virtio_device *dev);
 * @probe: the function to call when a device is found.  Returns a token for
 *    remove, or PTR_ERR().
 * @remove: the function when a device is removed.
 * @config_changed: optional function to call when the device configuration
 *    changes; may be called in interrupt context.
 */
struct virtio_driver {
	struct device_driver driver;
	const struct virtio_device_id *id_table;
	int (*probe)(struct virtio_device *dev);
	void (*remove)(struct virtio_device *dev);
	void (*config_changed)(struct virtio_device *dev);
};

int register_virtio_driver(struct virtio_driver *drv);