aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/virtio_blk.c4
-rw-r--r--drivers/virtio/virtio_balloon.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 7e83b6c6e3d6..cc6d39383a3f 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -246,8 +246,8 @@ static int virtblk_probe(struct virtio_device *vdev)
246 blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); 246 blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL);
247 247
248 /* Host must always specify the capacity. */ 248 /* Host must always specify the capacity. */
249 __virtio_config_val(vdev, offsetof(struct virtio_blk_config, capacity), 249 vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),
250 &cap); 250 &cap, sizeof(cap));
251 251
252 /* If capacity is too big, truncate with warning. */ 252 /* If capacity is too big, truncate with warning. */
253 if ((sector_t)cap != cap) { 253 if ((sector_t)cap != cap) {
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0b3efc31ee6d..fef88d84cef6 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -155,9 +155,9 @@ static void virtballoon_changed(struct virtio_device *vdev)
155static inline s64 towards_target(struct virtio_balloon *vb) 155static inline s64 towards_target(struct virtio_balloon *vb)
156{ 156{
157 u32 v; 157 u32 v;
158 __virtio_config_val(vb->vdev, 158 vb->vdev->config->get(vb->vdev,
159 offsetof(struct virtio_balloon_config, num_pages), 159 offsetof(struct virtio_balloon_config, num_pages),
160 &v); 160 &v, sizeof(v));
161 return v - vb->num_pages; 161 return v - vb->num_pages;
162} 162}
163 163