aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_main.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-05 01:53:16 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:34 -0500
commit23b9c1ab5baf368a32b7242bf110ef1f48700d04 (patch)
treee1da2529abd59a2b15213c837ab6bacd5e0f17dc /drivers/infiniband/hw/ehca/ehca_main.c
parent0478b83adb0269033221dc063d1185a224681ee8 (diff)
Infiniband: make ipath driver use default driver groups.
Make the ipath driver use the new driver functions so that it does not touch the sysfs portion of the driver structure. We also remove the redundant symlink from the device back to the driver, as it is already in the sysfs tree. Any userspace tools should be using the standard symlink, not some driver specific one. Cc: Roland Dreier <rdreier@cisco.com> Cc: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Cc: Arthur Jones <arthur.jones@qlogic.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 6a56d86a2951..c9e32b46387f 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -590,6 +590,11 @@ static struct attribute_group ehca_drv_attr_grp = {
590 .attrs = ehca_drv_attrs 590 .attrs = ehca_drv_attrs
591}; 591};
592 592
593static struct attribute_group *ehca_drv_attr_groups[] = {
594 &ehca_drv_attr_grp,
595 NULL,
596};
597
593#define EHCA_RESOURCE_ATTR(name) \ 598#define EHCA_RESOURCE_ATTR(name) \
594static ssize_t ehca_show_##name(struct device *dev, \ 599static ssize_t ehca_show_##name(struct device *dev, \
595 struct device_attribute *attr, \ 600 struct device_attribute *attr, \
@@ -899,6 +904,9 @@ static struct of_platform_driver ehca_driver = {
899 .match_table = ehca_device_table, 904 .match_table = ehca_device_table,
900 .probe = ehca_probe, 905 .probe = ehca_probe,
901 .remove = ehca_remove, 906 .remove = ehca_remove,
907 .driver = {
908 .groups = ehca_drv_attr_groups,
909 },
902}; 910};
903 911
904void ehca_poll_eqs(unsigned long data) 912void ehca_poll_eqs(unsigned long data)
@@ -957,10 +965,6 @@ int __init ehca_module_init(void)
957 goto module_init2; 965 goto module_init2;
958 } 966 }
959 967
960 ret = sysfs_create_group(&ehca_driver.driver.kobj, &ehca_drv_attr_grp);
961 if (ret) /* only complain; we can live without attributes */
962 ehca_gen_err("Cannot create driver attributes ret=%d", ret);
963
964 if (ehca_poll_all_eqs != 1) { 968 if (ehca_poll_all_eqs != 1) {
965 ehca_gen_err("WARNING!!!"); 969 ehca_gen_err("WARNING!!!");
966 ehca_gen_err("It is possible to lose interrupts."); 970 ehca_gen_err("It is possible to lose interrupts.");
@@ -986,7 +990,6 @@ void __exit ehca_module_exit(void)
986 if (ehca_poll_all_eqs == 1) 990 if (ehca_poll_all_eqs == 1)
987 del_timer_sync(&poll_eqs_timer); 991 del_timer_sync(&poll_eqs_timer);
988 992
989 sysfs_remove_group(&ehca_driver.driver.kobj, &ehca_drv_attr_grp);
990 ibmebus_unregister_driver(&ehca_driver); 993 ibmebus_unregister_driver(&ehca_driver);
991 994
992 ehca_destroy_slab_caches(); 995 ehca_destroy_slab_caches();