summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2021-02-28 20:08:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-03-01 17:29:10 +0100
commit88a5687d94d8a8c265bd1e4a7184fc60ef50900f (patch)
treeb7e64e20944010d908d485b74a594b9ae4164c05 /include
parentdb6acc08ec78cd019da87b22ef925ba78028abf4 (diff)
downloadbarebox-88a5687d94d8a8c265bd1e4a7184fc60ef50900f.tar.gz
barebox-88a5687d94d8a8c265bd1e4a7184fc60ef50900f.tar.xz
virtio: align virtio_config_ops::generation return type with Linux
The U-Boot return type for the function differs from Linux. We use the Linux API elsewhere, so use it here as well. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/virtio_config.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 5ee0807fb0..3ed7001f48 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -49,10 +49,9 @@ struct virtio_config_ops {
* generation() - config generation counter
*
* @vdev: the real virtio device
- * @counter: the returned config generation counter
- * @return 0 if OK, -ve on error
+ * @return the config generation counter
*/
- int (*generation)(struct virtio_device *vdev, u32 *counter);
+ u32 (*generation)(struct virtio_device *vdev);
/**
* get_status() - read the status byte
*
@@ -311,7 +310,7 @@ static inline void __virtio_cread_many(struct virtio_device *vdev,
int i;
/* no need to check return value as generation can be optional */
- vdev->config->generation(vdev, &gen);
+ gen = vdev->config->generation(vdev);
do {
old = gen;
@@ -319,7 +318,7 @@ static inline void __virtio_cread_many(struct virtio_device *vdev,
virtio_get_config(vdev, offset + bytes * i,
buf + i * bytes, bytes);
- vdev->config->generation(vdev, &gen);
+ gen = vdev->config->generation(vdev);
} while (gen != old);
}