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()
110 struct virtio_device *vdev = snd->vdev; in virtsnd_find_vqs() local
126 rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL); in virtsnd_find_vqs()
128 dev_err(&vdev->dev, "failed to initialize virtqueues\n"); in virtsnd_find_vqs()
194 struct virtio_device *vdev = snd->vdev; in virtsnd_build_devs() local
195 struct device *dev = &vdev->dev; in virtsnd_build_devs()
231 if (virtio_has_feature(vdev, VIRTIO_SND_F_CTLS)) { in virtsnd_build_devs()
271 static int virtsnd_validate(struct virtio_device *vdev) in virtsnd_validate() argument
273 if (!vdev->config->get) { in virtsnd_validate()
274 dev_err(&vdev->dev, "configuration access disabled\n"); in virtsnd_validate()
278 if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { in virtsnd_validate()
279 dev_err(&vdev->dev, in virtsnd_validate()
285 dev_err(&vdev->dev, "msg_timeout_ms value cannot be zero\n"); in virtsnd_validate()
289 if (virtsnd_pcm_validate(vdev)) in virtsnd_validate()
302 static int virtsnd_probe(struct virtio_device *vdev) in virtsnd_probe() argument
308 snd = devm_kzalloc(&vdev->dev, sizeof(*snd), GFP_KERNEL); in virtsnd_probe()
312 snd->vdev = vdev; in virtsnd_probe()
316 vdev->priv = snd; in virtsnd_probe()
325 virtio_device_ready(vdev); in virtsnd_probe()
335 virtsnd_remove(vdev); in virtsnd_probe()
346 static void virtsnd_remove(struct virtio_device *vdev) in virtsnd_remove() argument
348 struct virtio_snd *snd = vdev->priv; in virtsnd_remove()
357 vdev->config->del_vqs(vdev); in virtsnd_remove()
358 virtio_reset_device(vdev); in virtsnd_remove()
378 static int virtsnd_freeze(struct virtio_device *vdev) in virtsnd_freeze() argument
380 struct virtio_snd *snd = vdev->priv; in virtsnd_freeze()
386 vdev->config->del_vqs(vdev); in virtsnd_freeze()
387 virtio_reset_device(vdev); in virtsnd_freeze()
405 static int virtsnd_restore(struct virtio_device *vdev) in virtsnd_restore() argument
407 struct virtio_snd *snd = vdev->priv; in virtsnd_restore()
414 virtio_device_ready(vdev); in virtsnd_restore()