Lines Matching refs:vdev
18 static void virtsnd_remove(struct virtio_device *vdev);
81 struct virtio_snd *snd = vqueue->vdev->priv; in virtsnd_event_notify_cb()
111 struct virtio_device *vdev = snd->vdev; in virtsnd_find_vqs() local
129 rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, callbacks, names, in virtsnd_find_vqs()
132 dev_err(&vdev->dev, "failed to initialize virtqueues\n"); in virtsnd_find_vqs()
201 struct virtio_device *vdev = snd->vdev; in virtsnd_build_devs() local
202 struct device *dev = &vdev->dev; in virtsnd_build_devs()
266 static int virtsnd_validate(struct virtio_device *vdev) in virtsnd_validate() argument
268 if (!vdev->config->get) { in virtsnd_validate()
269 dev_err(&vdev->dev, "configuration access disabled\n"); in virtsnd_validate()
273 if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { in virtsnd_validate()
274 dev_err(&vdev->dev, in virtsnd_validate()
280 dev_err(&vdev->dev, "msg_timeout_ms value cannot be zero\n"); in virtsnd_validate()
284 if (virtsnd_pcm_validate(vdev)) in virtsnd_validate()
297 static int virtsnd_probe(struct virtio_device *vdev) in virtsnd_probe() argument
303 snd = devm_kzalloc(&vdev->dev, sizeof(*snd), GFP_KERNEL); in virtsnd_probe()
307 snd->vdev = vdev; in virtsnd_probe()
311 vdev->priv = snd; in virtsnd_probe()
320 virtio_device_ready(vdev); in virtsnd_probe()
330 virtsnd_remove(vdev); in virtsnd_probe()
341 static void virtsnd_remove(struct virtio_device *vdev) in virtsnd_remove() argument
343 struct virtio_snd *snd = vdev->priv; in virtsnd_remove()
352 vdev->config->del_vqs(vdev); in virtsnd_remove()
353 vdev->config->reset(vdev); in virtsnd_remove()
373 static int virtsnd_freeze(struct virtio_device *vdev) in virtsnd_freeze() argument
375 struct virtio_snd *snd = vdev->priv; in virtsnd_freeze()
381 vdev->config->del_vqs(vdev); in virtsnd_freeze()
382 vdev->config->reset(vdev); in virtsnd_freeze()
400 static int virtsnd_restore(struct virtio_device *vdev) in virtsnd_restore() argument
402 struct virtio_snd *snd = vdev->priv; in virtsnd_restore()
409 virtio_device_ready(vdev); in virtsnd_restore()