diff options
Diffstat (limited to 'drivers/s390/net/qeth_sys.c')
-rw-r--r-- | drivers/s390/net/qeth_sys.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index dda105b73063..f91a02db5743 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.54 $) | 3 | * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.55 $) |
4 | * | 4 | * |
5 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * This file contains code related to sysfs. | 6 | * This file contains code related to sysfs. |
@@ -20,7 +20,7 @@ | |||
20 | #include "qeth_mpc.h" | 20 | #include "qeth_mpc.h" |
21 | #include "qeth_fs.h" | 21 | #include "qeth_fs.h" |
22 | 22 | ||
23 | const char *VERSION_QETH_SYS_C = "$Revision: 1.54 $"; | 23 | const char *VERSION_QETH_SYS_C = "$Revision: 1.55 $"; |
24 | 24 | ||
25 | /*****************************************************************************/ | 25 | /*****************************************************************************/ |
26 | /* */ | 26 | /* */ |
@@ -937,6 +937,19 @@ static struct attribute_group qeth_device_attr_group = { | |||
937 | .attrs = (struct attribute **)qeth_device_attrs, | 937 | .attrs = (struct attribute **)qeth_device_attrs, |
938 | }; | 938 | }; |
939 | 939 | ||
940 | static struct device_attribute * qeth_osn_device_attrs[] = { | ||
941 | &dev_attr_state, | ||
942 | &dev_attr_chpid, | ||
943 | &dev_attr_if_name, | ||
944 | &dev_attr_card_type, | ||
945 | &dev_attr_buffer_count, | ||
946 | &dev_attr_recover, | ||
947 | NULL, | ||
948 | }; | ||
949 | |||
950 | static struct attribute_group qeth_osn_device_attr_group = { | ||
951 | .attrs = (struct attribute **)qeth_osn_device_attrs, | ||
952 | }; | ||
940 | 953 | ||
941 | #define QETH_DEVICE_ATTR(_id,_name,_mode,_show,_store) \ | 954 | #define QETH_DEVICE_ATTR(_id,_name,_mode,_show,_store) \ |
942 | struct device_attribute dev_attr_##_id = { \ | 955 | struct device_attribute dev_attr_##_id = { \ |
@@ -1667,7 +1680,12 @@ int | |||
1667 | qeth_create_device_attributes(struct device *dev) | 1680 | qeth_create_device_attributes(struct device *dev) |
1668 | { | 1681 | { |
1669 | int ret; | 1682 | int ret; |
1683 | struct qeth_card *card = dev->driver_data; | ||
1670 | 1684 | ||
1685 | if (card->info.type == QETH_CARD_TYPE_OSN) | ||
1686 | return sysfs_create_group(&dev->kobj, | ||
1687 | &qeth_osn_device_attr_group); | ||
1688 | |||
1671 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group))) | 1689 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group))) |
1672 | return ret; | 1690 | return ret; |
1673 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){ | 1691 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){ |
@@ -1693,6 +1711,12 @@ qeth_create_device_attributes(struct device *dev) | |||
1693 | void | 1711 | void |
1694 | qeth_remove_device_attributes(struct device *dev) | 1712 | qeth_remove_device_attributes(struct device *dev) |
1695 | { | 1713 | { |
1714 | struct qeth_card *card = dev->driver_data; | ||
1715 | |||
1716 | if (card->info.type == QETH_CARD_TYPE_OSN) | ||
1717 | return sysfs_remove_group(&dev->kobj, | ||
1718 | &qeth_osn_device_attr_group); | ||
1719 | |||
1696 | sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); | 1720 | sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); |
1697 | sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); | 1721 | sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); |
1698 | sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); | 1722 | sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); |