mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
14c8d110e0
commit
5bdebb183c
11 changed files with 61 additions and 87 deletions
|
@ -392,7 +392,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
|
|||
props.type = BACKLIGHT_RAW;
|
||||
snprintf(bl_name, sizeof(bl_name),
|
||||
"radeon_bl%d", dev->primary->index);
|
||||
bd = backlight_device_register(bl_name, &drm_connector->kdev,
|
||||
bd = backlight_device_register(bl_name, drm_connector->kdev,
|
||||
pdata, &radeon_backlight_ops, &props);
|
||||
if (IS_ERR(bd)) {
|
||||
DRM_ERROR("Backlight registration failed\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue