Lines Matching defs:dev
44 struct drm_device *dev;
49 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
50 if (!dev)
53 dev->platformdev = platdev;
54 dev->dev = &platdev->dev;
58 ret = drm_fill_in_dev(dev, NULL, driver);
65 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
66 dev_set_drvdata(&platdev->dev, dev);
67 ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL);
72 ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY);
76 if (dev->driver->load) {
77 ret = dev->driver->load(dev, 0);
83 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
84 ret = drm_mode_group_init_legacy_group(dev,
85 &dev->primary->mode_group);
90 list_add_tail(&dev->driver_item, &driver->device_list);
96 driver->date, dev->primary->index);
101 drm_put_minor(&dev->primary);
103 if (drm_core_check_feature(dev, DRIVER_MODESET))
104 drm_put_minor(&dev->control);
106 kfree(dev);