diff options
author | Dave Airlie <airlied@redhat.com> | 2013-10-11 14:07:25 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-10-22 09:37:40 +0100 |
commit | 5bdebb183c9702a8c57a01dff09337be3de337a6 (patch) | |
tree | e4ae9a441e4b2c4739902e4914852696accf1682 /drivers/gpu/drm/i915/intel_panel.c | |
parent | 14c8d110e083d3a09ccf8cfe18ad22fe1450c2e9 (diff) | |
download | op-kernel-dev-5bdebb183c9702a8c57a01dff09337be3de337a6.zip op-kernel-dev-5bdebb183c9702a8c57a01dff09337be3de337a6.tar.gz |
drm/sysfs: sort out minor and connector device object lifetimes.
So drm was abusing device lifetimes, by having embedded device structures
in the minor and connector it meant that the lifetime of the internal drm
objects (drm_minor and drm_connector) were tied to the lifetime of the device
files in sysfs, so if something kept those files opened the current code
would kfree the objects and things would go downhill from there.
Now in reality there is no need for these lifetimes to be so intertwined,
especailly with hotplugging of devices where we wish to remove the sysfs
and userspace facing pieces before we can unwind the internal objects due
to open userspace files or mmaps, so split the objects out so the struct
device is no longer embedded and do what fbdev does and just allocate
and remove the sysfs inodes separately.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_panel.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 5468416..c810209 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -722,7 +722,7 @@ int intel_panel_setup_backlight(struct drm_connector *connector) } dev_priv->backlight.device = backlight_device_register("intel_backlight", - &connector->kdev, dev, + connector->kdev, dev, &intel_panel_bl_ops, &props); if (IS_ERR(dev_priv->backlight.device)) { |