summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_l2_sys.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2020-12-07 14:12:30 +0100
committerDavid S. Miller <davem@davemloft.net>2020-12-07 06:55:21 -0800
commit0b8da8110b4fa3314a060e5c5a3b35a22b81e900 (patch)
treee28ec8ac21d25086d6a33ee793ccc22a676d6165 /drivers/s390/net/qeth_l2_sys.c
parent050663129a6d70a178a8545c31bc715bfb915355 (diff)
s390/qeth: use dev->groups for common sysfs attributes
All qeth devices have a minimum set of sysfs attributes, and non-OSN devices share a group of additional attributes. Depending on whether the device is forced to use a specific discipline, the device_type then specifies further attributes. Shift the common attributes into dev->groups, so that the device_type only contains the discipline-specific attributes. This avoids exposing the common attributes to the disciplines, and nicely cleans up our sysfs code. While replacing the qeth_l*_*_device_attributes() helpers, switch from sysfs_*_groups() to the more generic device_*_groups(). Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_sys.c')
-rw-r--r--drivers/s390/net/qeth_l2_sys.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/s390/net/qeth_l2_sys.c b/drivers/s390/net/qeth_l2_sys.c
index 4ba3bc57263f..a617351fff57 100644
--- a/drivers/s390/net/qeth_l2_sys.c
+++ b/drivers/s390/net/qeth_l2_sys.c
@@ -376,26 +376,7 @@ static struct attribute_group qeth_l2_vnicc_attr_group = {
.name = "vnicc",
};
-static const struct attribute_group *qeth_l2_only_attr_groups[] = {
- &qeth_l2_bridgeport_attr_group,
- &qeth_l2_vnicc_attr_group,
- NULL,
-};
-
-int qeth_l2_create_device_attributes(struct device *dev)
-{
- return sysfs_create_groups(&dev->kobj, qeth_l2_only_attr_groups);
-}
-
-void qeth_l2_remove_device_attributes(struct device *dev)
-{
- sysfs_remove_groups(&dev->kobj, qeth_l2_only_attr_groups);
-}
-
const struct attribute_group *qeth_l2_attr_groups[] = {
- &qeth_device_attr_group,
- &qeth_device_blkt_group,
- /* l2 specific, see qeth_l2_only_attr_groups: */
&qeth_l2_bridgeport_attr_group,
&qeth_l2_vnicc_attr_group,
NULL,