This allows us to do common extension without duplicating code.
Cc: Thomas Gleixner <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Halil Pasic <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: Vineeth Vijayan <[email protected]>
Cc: Peter Oberparleiter <[email protected]>
Cc: [email protected]
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
---
drivers/virtio/virtio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 938e975029d4..aa1eb5132767 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -430,7 +430,7 @@ int register_virtio_device(struct virtio_device *dev)
/* We always start by resetting the device, in case a previous
* driver messed it up. This also tests that code path a little. */
- dev->config->reset(dev);
+ virtio_reset_device(dev);
/* Acknowledge that we've seen the device. */
virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
@@ -496,7 +496,7 @@ int virtio_device_restore(struct virtio_device *dev)
/* We always start by resetting the device, in case a previous
* driver messed it up. */
- dev->config->reset(dev);
+ virtio_reset_device(dev);
/* Acknowledge that we've seen the device. */
virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
--
2.25.1
On Fri, May 27, 2022 at 8:01 AM Jason Wang <[email protected]> wrote:
>
> This allows us to do common extension without duplicating code.
>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: "Paul E. McKenney" <[email protected]>
> Cc: Marc Zyngier <[email protected]>
> Cc: Halil Pasic <[email protected]>
> Cc: Cornelia Huck <[email protected]>
> Cc: Vineeth Vijayan <[email protected]>
> Cc: Peter Oberparleiter <[email protected]>
> Cc: [email protected]
> Reviewed-by: Cornelia Huck <[email protected]>
> Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Eugenio PĂ©rez <[email protected]>
> ---
> drivers/virtio/virtio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index 938e975029d4..aa1eb5132767 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -430,7 +430,7 @@ int register_virtio_device(struct virtio_device *dev)
>
> /* We always start by resetting the device, in case a previous
> * driver messed it up. This also tests that code path a little. */
> - dev->config->reset(dev);
> + virtio_reset_device(dev);
>
> /* Acknowledge that we've seen the device. */
> virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
> @@ -496,7 +496,7 @@ int virtio_device_restore(struct virtio_device *dev)
>
> /* We always start by resetting the device, in case a previous
> * driver messed it up. */
> - dev->config->reset(dev);
> + virtio_reset_device(dev);
>
> /* Acknowledge that we've seen the device. */
> virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
> --
> 2.25.1
>
On Fri, 27 May 2022 14:01:13 +0800, Jason Wang <[email protected]> wrote:
> This allows us to do common extension without duplicating code.
>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: "Paul E. McKenney" <[email protected]>
> Cc: Marc Zyngier <[email protected]>
> Cc: Halil Pasic <[email protected]>
> Cc: Cornelia Huck <[email protected]>
> Cc: Vineeth Vijayan <[email protected]>
> Cc: Peter Oberparleiter <[email protected]>
> Cc: [email protected]
> Reviewed-by: Cornelia Huck <[email protected]>
> Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Xuan Zhuo <[email protected]>
> ---
> drivers/virtio/virtio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index 938e975029d4..aa1eb5132767 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -430,7 +430,7 @@ int register_virtio_device(struct virtio_device *dev)
>
> /* We always start by resetting the device, in case a previous
> * driver messed it up. This also tests that code path a little. */
> - dev->config->reset(dev);
> + virtio_reset_device(dev);
>
> /* Acknowledge that we've seen the device. */
> virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
> @@ -496,7 +496,7 @@ int virtio_device_restore(struct virtio_device *dev)
>
> /* We always start by resetting the device, in case a previous
> * driver messed it up. */
> - dev->config->reset(dev);
> + virtio_reset_device(dev);
>
> /* Acknowledge that we've seen the device. */
> virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
> --
> 2.25.1
>