Skip to content

Commit c9512fd

Browse files
committed
kobject documentation: remove default_attrs information
Since commit aa30f47 ("kobject: Add support for default attribute groups to kobj_type") we have been encouraging the use of default_groups instead of default_attrs, so reflect that information in the documentation as well so that no new users get added while the kernel is converted over to not use this field anymore. Cc: "Rafael J. Wysocki" <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0589e88 commit c9512fd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Documentation/core-api/kobject.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ kobj_type::
299299
struct kobj_type {
300300
void (*release)(struct kobject *kobj);
301301
const struct sysfs_ops *sysfs_ops;
302-
struct attribute **default_attrs;
303302
const struct attribute_group **default_groups;
304303
const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj);
305304
const void *(*namespace)(struct kobject *kobj);
@@ -313,10 +312,10 @@ call kobject_init() or kobject_init_and_add().
313312

314313
The release field in struct kobj_type is, of course, a pointer to the
315314
release() method for this type of kobject. The other two fields (sysfs_ops
316-
and default_attrs) control how objects of this type are represented in
315+
and default_groups) control how objects of this type are represented in
317316
sysfs; they are beyond the scope of this document.
318317

319-
The default_attrs pointer is a list of default attributes that will be
318+
The default_groups pointer is a list of default attributes that will be
320319
automatically created for any kobject that is registered with this ktype.
321320

322321

Documentation/translations/zh_CN/core-api/kobject.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ kobject_put()以避免错误的发生是一个很好的做法。
258258
struct kobj_type {
259259
void (*release)(struct kobject *kobj);
260260
const struct sysfs_ops *sysfs_ops;
261-
struct attribute **default_attrs;
262261
const struct attribute_group **default_groups;
263262
const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj);
264263
const void *(*namespace)(struct kobject *kobj);
@@ -271,10 +270,10 @@ kobject_init()或kobject_init_and_add()时必须指定一个指向该结构的
271270
指针。
272271

273272
当然,kobj_type结构中的release字段是指向这种类型的kobject的release()
274-
方法的一个指针。另外两个字段(sysfs_ops 和 default_attrs)控制这种
273+
方法的一个指针。另外两个字段(sysfs_ops 和 default_groups)控制这种
275274
类型的对象如何在 sysfs 中被表示;它们超出了本文的范围。
276275

277-
default_attrs 指针是一个默认属性的列表,它将为任何用这个 ktype 注册
276+
default_groups 指针是一个默认属性的列表,它将为任何用这个 ktype 注册
278277
的 kobject 自动创建。
279278

280279

0 commit comments

Comments
 (0)