summaryrefslogtreecommitdiff
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 = {
.attrs = ehca_drv_attrs
};
+static struct attribute_group *ehca_drv_attr_groups[] = {
+ &ehca_drv_attr_grp,
+ NULL,
+};
+
#define EHCA_RESOURCE_ATTR(name) \
static ssize_t ehca_show_##name(struct device *dev, \
struct device_attribute *attr, \
@@ -899,6 +904,9 @@ static struct of_platform_driver ehca_driver = {
.match_table = ehca_device_table,
.probe = ehca_probe,
.remove = ehca_remove,
+ .driver = {
+ .groups = ehca_drv_attr_groups,
+ },
};
void ehca_poll_eqs(unsigned long data)
@@ -957,10 +965,6 @@ int __init ehca_module_init(void)
goto module_init2;
}
- ret = sysfs_create_group(&ehca_driver.driver.kobj, &ehca_drv_attr_grp);
- if (ret) /* only complain; we can live without attributes */
- ehca_gen_err("Cannot create driver attributes ret=%d", ret);
-
if (ehca_poll_all_eqs != 1) {
ehca_gen_err("WARNING!!!");
ehca_gen_err("It is possible to lose interrupts.");
@@ -986,7 +990,6 @@ void __exit ehca_module_exit(void)
if (ehca_poll_all_eqs == 1)
del_timer_sync(&poll_eqs_timer);
- sysfs_remove_group(&ehca_driver.driver.kobj, &ehca_drv_attr_grp);
ibmebus_unregister_driver(&ehca_driver);
ehca_destroy_slab_caches();