[PATCH] drm/vmwgfx: use default_groups in kobj_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.  Move the vmwgfx sysfs code to use default_groups field which has
been the preferred way since aa30f47cf666 ("kobject: Add support for
default attribute groups to kobj_type") so that we can soon get rid of
the obsolete default_attrs field.

Cc: VMware Graphics <linux-graphics-maintainer@xxxxxxxxxx>
Cc: Zack Rusin <zackr@xxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/vmwgfx/ttm_memory.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/ttm_memory.c b/drivers/gpu/drm/vmwgfx/ttm_memory.c
index 7f7fe35fc21d..f49190aadb08 100644
--- a/drivers/gpu/drm/vmwgfx/ttm_memory.c
+++ b/drivers/gpu/drm/vmwgfx/ttm_memory.c
@@ -162,6 +162,7 @@ static struct attribute *ttm_mem_zone_attrs[] = {
 	&ttm_mem_used,
 	NULL
 };
+ATTRIBUTE_GROUPS(ttm_mem_zone);
 
 static const struct sysfs_ops ttm_mem_zone_ops = {
 	.show = &ttm_mem_zone_show,
@@ -171,7 +172,7 @@ static const struct sysfs_ops ttm_mem_zone_ops = {
 static struct kobj_type ttm_mem_zone_kobj_type = {
 	.release = &ttm_mem_zone_kobj_release,
 	.sysfs_ops = &ttm_mem_zone_ops,
-	.default_attrs = ttm_mem_zone_attrs,
+	.default_groups = ttm_mem_zone_groups,
 };
 
 static struct attribute ttm_mem_global_lower_mem_limit = {
@@ -226,6 +227,7 @@ static struct attribute *ttm_mem_global_attrs[] = {
 	&ttm_mem_global_lower_mem_limit,
 	NULL
 };
+ATTRIBUTE_GROUPS(ttm_mem_global);
 
 static const struct sysfs_ops ttm_mem_global_ops = {
 	.show = &ttm_mem_global_show,
@@ -234,7 +236,7 @@ static const struct sysfs_ops ttm_mem_global_ops = {
 
 static struct kobj_type ttm_mem_glob_kobj_type = {
 	.sysfs_ops = &ttm_mem_global_ops,
-	.default_attrs = ttm_mem_global_attrs,
+	.default_groups = ttm_mem_global_groups,
 };
 
 static bool ttm_zones_above_swap_target(struct ttm_mem_global *glob,
-- 
2.34.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux