summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_tile_sysfs.c
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2024-05-22 13:21:45 +0300
committerMatthew Auld <matthew.auld@intel.com>2024-05-22 15:22:38 +0300
commitc60f91bbc4bcd91f9c7f3de36c541951b12d165a (patch)
tree0ac0cc9964ad2780e16ee6263daa2b38c2cbb978 /drivers/gpu/drm/xe/xe_tile_sysfs.c
parent4465b8c6d3539811ce576f163cb3bf3890e5c883 (diff)
downloadlinux-c60f91bbc4bcd91f9c7f3de36c541951b12d165a.tar.xz
drm/xe: covert sysfs over to devm
Hotunplugging the device seems to result in stuff like: kobject_add_internal failed for tile0 with -EEXIST, don't try to register things with the same name in the same directory. We only remove the sysfs as part of drmm, however that is tied to the lifetime of the driver instance and not the device underneath. Attempt to fix by using devm for all of the remaining sysfs stuff related to the device. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1667 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1432 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-20-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_tile_sysfs.c')
-rw-r--r--drivers/gpu/drm/xe/xe_tile_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c b/drivers/gpu/drm/xe/xe_tile_sysfs.c
index 64661403afcd..b804234a6551 100644
--- a/drivers/gpu/drm/xe/xe_tile_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c
@@ -22,7 +22,7 @@ static const struct kobj_type xe_tile_sysfs_kobj_type = {
.sysfs_ops = &kobj_sysfs_ops,
};
-static void tile_sysfs_fini(struct drm_device *drm, void *arg)
+static void tile_sysfs_fini(void *arg)
{
struct xe_tile *tile = arg;
@@ -55,5 +55,5 @@ int xe_tile_sysfs_init(struct xe_tile *tile)
if (err)
return err;
- return drmm_add_action_or_reset(&xe->drm, tile_sysfs_fini, tile);
+ return devm_add_action_or_reset(xe->drm.dev, tile_sysfs_fini, tile);
}