diff options
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/transport_class.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/transport_class.c b/drivers/base/transport_class.c index 4b1e8820e764..416e9f819df5 100644 --- a/drivers/base/transport_class.c +++ b/drivers/base/transport_class.c @@ -165,6 +165,12 @@ static int transport_add_class_device(struct attribute_container *cont, goto err_del; } + if (tcont->encryption) { + error = sysfs_create_group(&classdev->kobj, tcont->encryption); + if (error) + goto err_del; + } + return 0; err_del: @@ -240,6 +246,8 @@ static int transport_remove_classdev(struct attribute_container *cont, if (tclass->remove != anon_transport_dummy_function) { if (tcont->statistics) sysfs_remove_group(&classdev->kobj, tcont->statistics); + if (tcont->encryption) + sysfs_remove_group(&classdev->kobj, tcont->encryption); attribute_container_class_device_del(classdev); } |
