removed dev->sysdev_registered

main
Jon Smirl 2005-06-26 13:31:15 +00:00
parent 9deb276a06
commit afdabdabf5
2 changed files with 8 additions and 7 deletions

View File

@ -724,7 +724,6 @@ typedef struct drm_device {
drm_head_t primary; /**< primary screen head */
struct sys_device sysdev; /**< Power Management device structure */
int sysdev_registered; /**< Whether the device has been registered */
} drm_device_t;
static __inline__ int drm_core_check_feature(struct drm_device *dev,

View File

@ -86,6 +86,9 @@ int drm_pm_setup(drm_device_t *dev)
{
int rc;
if (atomic_read(&sysdev_loaded) == -1)
return 0;
DRM_DEBUG("\n");
dev->sysdev.id = dev->primary.minor;
@ -96,8 +99,6 @@ int drm_pm_setup(drm_device_t *dev)
#else
rc = sysdev_register(&dev->sysdev);
#endif
if (!rc)
dev->sysdev_registered = 1;
return rc;
}
@ -108,16 +109,17 @@ int drm_pm_setup(drm_device_t *dev)
*/
void drm_pm_takedown(drm_device_t *dev)
{
if (atomic_read(&sysdev_loaded) == -1)
return;
DRM_DEBUG("\n");
if(dev->sysdev_registered) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4)
sys_device_unregister(&dev->sysdev);
#else
sysdev_unregister(&dev->sysdev);
#endif
}
}
int drm_pm_init(void)
{