From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
VMware Graphics <linux-graphics-maintainer@vmware.com>,
Zack Rusin <zackr@vmware.com>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/vmwgfx: use default_groups in kobj_type
Date: Thu, 6 Jan 2022 10:58:35 +0100 [thread overview]
Message-ID: <20220106095835.3276797-1-gregkh@linuxfoundation.org> (raw)
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@vmware.com>
Cc: Zack Rusin <zackr@vmware.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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
reply other threads:[~2022-01-06 9:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220106095835.3276797-1-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zackr@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome