From 23b9c1ab5baf368a32b7242bf110ef1f48700d04 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 4 Dec 2007 22:53:16 -0800 Subject: 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 Cc: Bryan O'Sullivan Cc: Arthur Jones Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/ehca/ehca_main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'drivers/infiniband/hw/ehca') 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(); -- cgit v1.2.3-59-g8ed1b