diff options
Diffstat (limited to 'drivers/md/dm-sysfs.c')
-rw-r--r-- | drivers/md/dm-sysfs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index 4b045903a4e2..f53392df7b97 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c | |||
@@ -59,7 +59,7 @@ static ssize_t dm_attr_uuid_show(struct mapped_device *md, char *buf) | |||
59 | 59 | ||
60 | static ssize_t dm_attr_suspended_show(struct mapped_device *md, char *buf) | 60 | static ssize_t dm_attr_suspended_show(struct mapped_device *md, char *buf) |
61 | { | 61 | { |
62 | sprintf(buf, "%d\n", dm_suspended(md)); | 62 | sprintf(buf, "%d\n", dm_suspended_md(md)); |
63 | 63 | ||
64 | return strlen(buf); | 64 | return strlen(buf); |
65 | } | 65 | } |
@@ -80,12 +80,20 @@ static struct sysfs_ops dm_sysfs_ops = { | |||
80 | }; | 80 | }; |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * The sysfs structure is embedded in md struct, nothing to do here | ||
84 | */ | ||
85 | static void dm_sysfs_release(struct kobject *kobj) | ||
86 | { | ||
87 | } | ||
88 | |||
89 | /* | ||
83 | * dm kobject is embedded in mapped_device structure | 90 | * dm kobject is embedded in mapped_device structure |
84 | * no need to define release function here | 91 | * no need to define release function here |
85 | */ | 92 | */ |
86 | static struct kobj_type dm_ktype = { | 93 | static struct kobj_type dm_ktype = { |
87 | .sysfs_ops = &dm_sysfs_ops, | 94 | .sysfs_ops = &dm_sysfs_ops, |
88 | .default_attrs = dm_attrs, | 95 | .default_attrs = dm_attrs, |
96 | .release = dm_sysfs_release | ||
89 | }; | 97 | }; |
90 | 98 | ||
91 | /* | 99 | /* |