aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/translations/zh_CN
diff options
context:
space:
mode:
authorDenis Efremov <efremov@linux.com>2020-08-30 17:41:35 +0300
committerJonathan Corbet <corbet@lwn.net>2020-09-09 11:35:51 -0600
commite046de3d79d7f2257b86a142a00e4e3a2fdb41b7 (patch)
tree9650d175db1588072d843d264df7193c386f39e5 /Documentation/translations/zh_CN
parentDocumentation: remove current_security() reference (diff)
downloadlinux-dev-e046de3d79d7f2257b86a142a00e4e3a2fdb41b7.tar.xz
linux-dev-e046de3d79d7f2257b86a142a00e4e3a2fdb41b7.zip
docs: filesystems: replace to_dev() with kobj_to_dev()
Commit a4232963757e ("driver-core: Move kobj_to_dev from genhd.h to device.h") introduced kobj_to_dev() function. Signed-off-by: Denis Efremov <efremov@linux.com> Link: https://lore.kernel.org/r/20200830144135.6956-1-efremov@linux.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/translations/zh_CN')
-rw-r--r--Documentation/translations/zh_CN/filesystems/sysfs.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/Documentation/translations/zh_CN/filesystems/sysfs.txt b/Documentation/translations/zh_CN/filesystems/sysfs.txt
index 9481e3ed2a06..046cc1d52058 100644
--- a/Documentation/translations/zh_CN/filesystems/sysfs.txt
+++ b/Documentation/translations/zh_CN/filesystems/sysfs.txt
@@ -154,14 +154,13 @@ sysfs 会为这个类型调用适当的方法。当一个文件被读写时,è¿
示例:
-#define to_dev(obj) container_of(obj, struct device, kobj)
#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
char *buf)
{
struct device_attribute *dev_attr = to_dev_attr(attr);
- struct device *dev = to_dev(kobj);
+ struct device *dev = kobj_to_dev(kobj);
ssize_t ret = -EIO;
if (dev_attr->show)