aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_main.c
diff options
context:
space:
mode:
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();