summaryrefslogtreecommitdiff
path: root/linux-core/intel_crt.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@jbarnes-t61.(none)>2008-06-05 15:58:43 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-06-05 15:58:43 -0700
commit03bf1fba67413f381d2a548fe08bd634a48fcc48 (patch)
tree703cb4bd2b0b5b134f9848ed84c1f36951843a12 /linux-core/intel_crt.c
parente90716671d7a5dabf13c22a339f750dba77f438a (diff)
sysfs registration/teardown fixups
A check in drm_sysfs_connector_remove was supposed to allow it to be called even with unregistered objects, to make cleanup paths a little simpler. However, device_is_regsitered didn't always seem to return what we thought it would, so we'd sometimes end up leaving objects lying around rather than unregistering them. Fix this situation up by requiring devices to be registered before being removed. Any problems resulting from this change should be easier to track down than the alternative (which is leaving kobjects registered after unload).
Diffstat (limited to 'linux-core/intel_crt.c')
-rw-r--r--linux-core/intel_crt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/intel_crt.c b/linux-core/intel_crt.c
index e32a9551..b9e8ee63 100644
--- a/linux-core/intel_crt.c
+++ b/linux-core/intel_crt.c
@@ -268,18 +268,20 @@ void intel_crt_init(struct drm_device *dev)
return;
connector = &intel_output->base;
- drm_connector_init(dev, &intel_output->base, &intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);
+ drm_connector_init(dev, &intel_output->base,
+ &intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);
- drm_encoder_init(dev, &intel_output->enc, &intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC);
+ drm_encoder_init(dev, &intel_output->enc, &intel_crt_enc_funcs,
+ DRM_MODE_ENCODER_DAC);
- drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc);
+ drm_mode_connector_attach_encoder(&intel_output->base,
+ &intel_output->enc);
/* Set up the DDC bus. */
intel_output->ddc_bus = intel_i2c_create(dev, GPIOA, "CRTDDC_A");
if (!intel_output->ddc_bus) {
dev_printk(KERN_ERR, &dev->pdev->dev, "DDC bus registration "
"failed.\n");
- intel_crt_destroy(connector);
return;
}
@@ -291,6 +293,4 @@ void intel_crt_init(struct drm_device *dev)
drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs);
drm_sysfs_connector_add(connector);
-
-
}