NULL,
};
-static ssize_t description_show(struct mdev_type *mtype,
- struct mdev_type_attribute *attr, char *buf)
+static ssize_t mbochs_show_description(struct mdev_type *mtype, char *buf)
{
struct mbochs_type *type =
container_of(mtype, struct mbochs_type, type);
return sprintf(buf, "virtual display, %d MB video memory\n",
type ? type->mbytes : 0);
}
-static MDEV_TYPE_ATTR_RO(description);
static unsigned int mbochs_get_available(struct mdev_type *mtype)
{
return atomic_read(&mbochs_avail_mbytes) / type->mbytes;
}
-static const struct attribute *mdev_types_attrs[] = {
- &mdev_type_attr_description.attr,
- NULL,
-};
-
static const struct vfio_device_ops mbochs_dev_ops = {
.close_device = mbochs_close_device,
.init = mbochs_init_dev,
.probe = mbochs_probe,
.remove = mbochs_remove,
.get_available = mbochs_get_available,
- .types_attrs = mdev_types_attrs,
+ .show_description = mbochs_show_description,
};
static const struct file_operations vd_fops = {