Lines Matching defs:mdev
32 #include <linux/mdev.h>
161 /* State of each mdev device */
167 struct mdev_device *mdev;
250 struct device *dev = mdev_dev(mdev_state->mdev);
308 struct device *dev = mdev_dev(mdev_state->mdev);
336 struct device *dev = mdev_dev(mdev_state->mdev);
366 struct device *dev = mdev_dev(mdev_state->mdev);
438 static ssize_t mdev_access(struct mdev_device *mdev, char *buf, size_t count,
441 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
442 struct device *dev = mdev_dev(mdev);
506 static int mbochs_reset(struct mdev_device *mdev)
508 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
519 static int mbochs_create(struct kobject *kobj, struct mdev_device *mdev)
522 struct device *dev = mdev_dev(mdev);
550 mdev_state->mdev = mdev;
551 mdev_set_drvdata(mdev, mdev_state);
561 mbochs_reset(mdev);
572 static int mbochs_remove(struct mdev_device *mdev)
574 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
577 mdev_set_drvdata(mdev, NULL);
584 static ssize_t mbochs_read(struct mdev_device *mdev, char __user *buf,
596 ret = mdev_access(mdev, (char *)&val, sizeof(val),
608 ret = mdev_access(mdev, (char *)&val, sizeof(val),
620 ret = mdev_access(mdev, (char *)&val, sizeof(val),
643 static ssize_t mbochs_write(struct mdev_device *mdev, const char __user *buf,
658 ret = mdev_access(mdev, (char *)&val, sizeof(val),
670 ret = mdev_access(mdev, (char *)&val, sizeof(val),
682 ret = mdev_access(mdev, (char *)&val, sizeof(val),
733 struct device *dev = mdev_dev(mdev_state->mdev);
768 static int mbochs_mmap(struct mdev_device *mdev, struct vm_area_struct *vma)
770 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
806 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev);
821 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev);
838 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev);
867 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev);
880 struct device *dev = mdev_dev(mdev_state->mdev);
977 struct device *dev = mdev_dev(mdev_state->mdev);
1005 static int mbochs_get_region_info(struct mdev_device *mdev,
1011 mdev_state = mdev_get_drvdata(mdev);
1061 static int mbochs_get_irq_info(struct mdev_device *mdev,
1068 static int mbochs_get_device_info(struct mdev_device *mdev,
1077 static int mbochs_query_gfx_plane(struct mdev_device *mdev,
1080 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
1081 struct device *dev = mdev_dev(mdev);
1143 static int mbochs_get_gfx_dmabuf(struct mdev_device *mdev,
1146 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
1168 static long mbochs_ioctl(struct mdev_device *mdev, unsigned int cmd,
1187 ret = mbochs_get_device_info(mdev, &info);
1211 ret = mbochs_get_region_info(mdev, &info);
1234 ret = mbochs_get_irq_info(mdev, &info);
1257 ret = mbochs_query_gfx_plane(mdev, &plane);
1274 return mbochs_get_gfx_dmabuf(mdev, dmabuf_id);
1281 return mbochs_reset(mdev);
1286 static int mbochs_open(struct mdev_device *mdev)
1294 static void mbochs_close(struct mdev_device *mdev)
1296 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
1320 struct mdev_device *mdev = mdev_from_dev(dev);
1321 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);