diff options
author | Ma Ling <ling.ma@intel.com> | 2009-04-16 05:51:25 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-04-19 20:03:46 -0400 |
commit | 77d26dc9b9805f322f5a1f6e559b18ad66205bd9 (patch) | |
tree | e09b35638a3d0fb9bd319498ec406ffd95a199eb | |
parent | d9c6f546469f33f9aa48ae5991c33da8cd535b37 (diff) |
drm: clean dirty memory after device release
In current code we register/unregister connector object by
drm_sysfs_connector_add/remove function.
However under some cases, we need to dynamically register or unregister device
multiple times, so we have to go through register -> unregister ->register
routine.
Because after device_unregister function our memory is dirty, we need to do
clean operation in order to re-register the device, otherwise the system
will crash. The patch intends to clean device after device release.
Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_sysfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index bc0c6849360c..022876ae34f0 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c | |||
@@ -132,6 +132,7 @@ void drm_sysfs_destroy(void) | |||
132 | */ | 132 | */ |
133 | static void drm_sysfs_device_release(struct device *dev) | 133 | static void drm_sysfs_device_release(struct device *dev) |
134 | { | 134 | { |
135 | memset(dev, 0, sizeof(struct device)); | ||
135 | return; | 136 | return; |
136 | } | 137 | } |
137 | 138 | ||