From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org,
Ursula Braun <ubraun@linux.vnet.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: [patch 2/3] netiucv: Use device_driver default attribute groups.
Date: Wed, 5 Dec 2007 12:50:28 +0100 [thread overview]
Message-ID: <20071205125028.026a617d@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20071205114119.905238262@de.ibm.com>
CC: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
drivers/s390/net/netiucv.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
--- linux-2.6.orig/drivers/s390/net/netiucv.c
+++ linux-2.6/drivers/s390/net/netiucv.c
@@ -2089,6 +2089,11 @@ static struct attribute_group netiucv_dr
.attrs = netiucv_drv_attrs,
};
+static struct attribute_group *netiucv_drv_attr_groups[] = {
+ &netiucv_drv_attr_group,
+ NULL,
+};
+
static void netiucv_banner(void)
{
PRINT_INFO("NETIUCV driver initialized\n");
@@ -2113,7 +2118,6 @@ static void __exit netiucv_exit(void)
netiucv_unregister_device(dev);
}
- sysfs_remove_group(&netiucv_driver.kobj, &netiucv_drv_attr_group);
driver_unregister(&netiucv_driver);
iucv_unregister(&netiucv_handler, 1);
iucv_unregister_dbf_views();
@@ -2133,6 +2137,7 @@ static int __init netiucv_init(void)
if (rc)
goto out_dbf;
IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
+ netiucv_driver.groups = netiucv_drv_attr_groups;
rc = driver_register(&netiucv_driver);
if (rc) {
PRINT_ERR("NETIUCV: failed to register driver.\n");
@@ -2140,18 +2145,9 @@ static int __init netiucv_init(void)
goto out_iucv;
}
- rc = sysfs_create_group(&netiucv_driver.kobj, &netiucv_drv_attr_group);
- if (rc) {
- PRINT_ERR("NETIUCV: failed to add driver attributes.\n");
- IUCV_DBF_TEXT_(setup, 2,
- "ret %d - netiucv_drv_attr_group\n", rc);
- goto out_driver;
- }
netiucv_banner();
return rc;
-out_driver:
- driver_unregister(&netiucv_driver);
out_iucv:
iucv_unregister(&netiucv_handler, 1);
out_dbf:
next prev parent reply other threads:[~2007-12-05 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071205114119.905238262@de.ibm.com>
2007-12-05 11:50 ` [patch 1/3] driver core: Introduce " Cornelia Huck
2007-12-05 16:24 ` Greg KH
2007-12-05 11:50 ` Cornelia Huck [this message]
2007-12-05 11:50 ` [patch 3/3] zfcp: Use device_driver " Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071205125028.026a617d@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ubraun@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®