Lines Matching refs:vdev
18 static void virtsnd_remove(struct virtio_device *vdev);
84 struct virtio_snd *snd = vqueue->vdev->priv; in virtsnd_event_notify_cb()
112 struct virtio_device *vdev = snd->vdev; in virtsnd_find_vqs() local
128 rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL); in virtsnd_find_vqs()
130 dev_err(&vdev->dev, "failed to initialize virtqueues\n"); in virtsnd_find_vqs()
199 struct virtio_device *vdev = snd->vdev; in virtsnd_build_devs() local
200 struct device *dev = &vdev->dev; in virtsnd_build_devs()
236 if (virtio_has_feature(vdev, VIRTIO_SND_F_CTLS)) { in virtsnd_build_devs()
276 static int virtsnd_validate(struct virtio_device *vdev) in virtsnd_validate() argument
278 if (!vdev->config->get) { in virtsnd_validate()
279 dev_err(&vdev->dev, "configuration access disabled\n"); in virtsnd_validate()
283 if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { in virtsnd_validate()
284 dev_err(&vdev->dev, in virtsnd_validate()
290 dev_err(&vdev->dev, "msg_timeout_ms value cannot be zero\n"); in virtsnd_validate()
294 if (virtsnd_pcm_validate(vdev)) in virtsnd_validate()
307 static int virtsnd_probe(struct virtio_device *vdev) in virtsnd_probe() argument
313 snd = devm_kzalloc(&vdev->dev, sizeof(*snd), GFP_KERNEL); in virtsnd_probe()
317 snd->vdev = vdev; in virtsnd_probe()
321 vdev->priv = snd; in virtsnd_probe()
330 virtio_device_ready(vdev); in virtsnd_probe()
340 virtsnd_remove(vdev); in virtsnd_probe()
351 static void virtsnd_remove(struct virtio_device *vdev) in virtsnd_remove() argument
353 struct virtio_snd *snd = vdev->priv; in virtsnd_remove()
362 vdev->config->del_vqs(vdev); in virtsnd_remove()
363 virtio_reset_device(vdev); in virtsnd_remove()
383 static int virtsnd_freeze(struct virtio_device *vdev) in virtsnd_freeze() argument
385 struct virtio_snd *snd = vdev->priv; in virtsnd_freeze()
391 vdev->config->del_vqs(vdev); in virtsnd_freeze()
392 virtio_reset_device(vdev); in virtsnd_freeze()
410 static int virtsnd_restore(struct virtio_device *vdev) in virtsnd_restore() argument
412 struct virtio_snd *snd = vdev->priv; in virtsnd_restore()
419 virtio_device_ready(vdev); in virtsnd_restore()