diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-07-23 05:38:38 -0400 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-08-05 10:08:21 -0400 |
commit | e17280758cc0b4f3d7065554006adcb87448f6c0 (patch) | |
tree | 71641f392c6ab39518ac56b2efa4763e7f5ecdd8 /include/drm | |
parent | f1b8596283f681b82546d6302bc7c372fdb2d422 (diff) |
drm: make sysfs device always available for minors
For each minor we allocate a sysfs device as minor->kdev. Currently, this
is allocated and registered in drm_minor_register(). This makes it
impossible to add sysfs-attributes to the device before it is registered.
Therefore, they are not added atomically, nor can we move device_add()
*after* ->load() is called.
This patch makes minor->kdev available early, but only adds the device
during minor-registration. Note that the registration is still called
before ->load() as debugfs needs to be split, too. This will be fixed in
follow-ups.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index c480b448ce65..458385ec15f3 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1502,9 +1502,8 @@ extern int drm_pci_set_unique(struct drm_device *dev, | |||
1502 | struct drm_sysfs_class; | 1502 | struct drm_sysfs_class; |
1503 | extern struct class *drm_sysfs_create(struct module *owner, char *name); | 1503 | extern struct class *drm_sysfs_create(struct module *owner, char *name); |
1504 | extern void drm_sysfs_destroy(void); | 1504 | extern void drm_sysfs_destroy(void); |
1505 | extern int drm_sysfs_device_add(struct drm_minor *minor); | 1505 | extern struct device *drm_sysfs_minor_alloc(struct drm_minor *minor); |
1506 | extern void drm_sysfs_hotplug_event(struct drm_device *dev); | 1506 | extern void drm_sysfs_hotplug_event(struct drm_device *dev); |
1507 | extern void drm_sysfs_device_remove(struct drm_minor *minor); | ||
1508 | extern int drm_sysfs_connector_add(struct drm_connector *connector); | 1507 | extern int drm_sysfs_connector_add(struct drm_connector *connector); |
1509 | extern void drm_sysfs_connector_remove(struct drm_connector *connector); | 1508 | extern void drm_sysfs_connector_remove(struct drm_connector *connector); |
1510 | 1509 | ||