IB/ehca: Use round_jiffies() for EQ polling timer
[pandora-kernel.git] / drivers / infiniband / hw / ehca / ehca_main.c
index 6a56d86..173d3e9 100644 (file)
@@ -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)
@@ -926,7 +934,7 @@ void ehca_poll_eqs(unsigned long data)
                                ehca_process_eq(shca, 0);
                }
        }
-       mod_timer(&poll_eqs_timer, jiffies + HZ);
+       mod_timer(&poll_eqs_timer, round_jiffies(jiffies + HZ));
        spin_unlock(&shca_list_lock);
 }
 
@@ -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();