Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293796
b: refs/heads/master
c: 1828fe6
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Mar 15, 2012
1 parent fb08450 commit b99940e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce880cb860f36694d2cdebfac9e6ae18176fe4c4
refs/heads/master: 1828fe6c5f593b835197edd30a28d80635238ab3
7 changes: 6 additions & 1 deletion trunk/drivers/gpu/drm/drm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,16 @@ void drm_sysfs_connector_remove(struct drm_connector *connector)
{
int i;

if (!connector->kdev.parent)
return;
DRM_DEBUG("removing \"%s\" from sysfs\n",
drm_get_connector_name(connector));

for (i = 0; i < ARRAY_SIZE(connector_attrs); i++)
device_remove_file(&connector->kdev, &connector_attrs[i]);
sysfs_remove_bin_file(&connector->kdev.kobj, &edid_attr);
device_unregister(&connector->kdev);
connector->kdev.parent = NULL;
}
EXPORT_SYMBOL(drm_sysfs_connector_remove);

Expand Down Expand Up @@ -533,7 +536,9 @@ int drm_sysfs_device_add(struct drm_minor *minor)
*/
void drm_sysfs_device_remove(struct drm_minor *minor)
{
device_unregister(&minor->kdev);
if (minor->kdev.parent)
device_unregister(&minor->kdev);
minor->kdev.parent = NULL;
}


Expand Down

0 comments on commit b99940e

Please sign in to comment.