summaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-02-15 11:50:55 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-17 15:10:49 +0900
commit70359c4a6802caa9e5a9233b863c6175e011abeb (patch)
tree290c00286d7b17b6bfb78e227f9b973e044435ab /drivers/rapidio/rio.c
parentdde04eb116fa1b0b0d443532af8c167520402b70 (diff)
downloadlinux-stable-70359c4a6802caa9e5a9233b863c6175e011abeb.tar.gz
linux-stable-70359c4a6802caa9e5a9233b863c6175e011abeb.tar.bz2
linux-stable-70359c4a6802caa9e5a9233b863c6175e011abeb.zip
rapidio: use is_visible() to hide switch-specific attributes
Instead of creating switch-specific attributes by hand, implement is_visible() method of attribute group and hide them when dealing with non-switch devices. This will ensure that all attributes are created together, before userspace gets notified of new device. Also, remove rio-sysfs.c from list of files that are scanned when compiling RapiodIO documentations as it no longer has any structured comments, and leaving it in leads to warning when building docs. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rapidio/rio.c')
-rw-r--r--drivers/rapidio/rio.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 37042858c2db..38d949405618 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -192,8 +192,6 @@ int rio_add_device(struct rio_dev *rdev)
}
spin_unlock(&rio_global_list_lock);
- rio_create_sysfs_dev_files(rdev);
-
return 0;
}
EXPORT_SYMBOL_GPL(rio_add_device);
@@ -220,7 +218,6 @@ void rio_del_device(struct rio_dev *rdev, enum rio_device_state state)
}
}
spin_unlock(&rio_global_list_lock);
- rio_remove_sysfs_dev_files(rdev);
device_unregister(&rdev->dev);
}
EXPORT_SYMBOL_GPL(rio_del_device);