summaryrefslogtreecommitdiff
path: root/linux/drm_stub.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drm_stub.h')
-rw-r--r--linux/drm_stub.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/drm_stub.h b/linux/drm_stub.h
index 9dbf5617..9a4430d3 100644
--- a/linux/drm_stub.h
+++ b/linux/drm_stub.h
@@ -179,6 +179,7 @@ static int DRM(stub_getminor)(const char *name, struct file_operations *fops,
&DRM(stub_list)[i].dev_root);
(*DRM(stub_info).info_count)++;
DRM_DEBUG("info count increased %d\n", *DRM(stub_info).info_count);
+
return i;
}
}
@@ -303,7 +304,10 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
DRM_DEBUG("info_register failed, deregistered everything\n");
}
DRM_DEBUG("info_register failed\n");
+ return ret2;
}
+ class_simple_device_add(DRM(stub_info).drm_class,
+ MKDEV(DRM_MAJOR, ret2), &dev->pdev->dev, "card%d", ret2);
return ret2;
}
return -1;
@@ -319,6 +323,7 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
int DRM(stub_unregister)(int minor)
{
DRM_DEBUG("%d\n", minor);
+ class_simple_device_remove(MKDEV(DRM_MAJOR, minor));
if (DRM(stub_info).info_unregister)
return DRM(stub_info).info_unregister(minor);
return -1;