diff options
author | Jan-Bernd Themann <ossthema@de.ibm.com> | 2007-07-05 09:26:25 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-10 12:59:41 -0400 |
commit | 4c3ca4da8086c3c9fcc81dccc387c34bee6b755e (patch) | |
tree | c08bec3d3b32c2a94196e0cf058aaf10ed6f1d87 /drivers/net/ehea/ehea_main.c | |
parent | e1abecc48938fbe1966ea6e78267fc673fa59295 (diff) | |
download | blackbird-op-linux-4c3ca4da8086c3c9fcc81dccc387c34bee6b755e.tar.gz blackbird-op-linux-4c3ca4da8086c3c9fcc81dccc387c34bee6b755e.zip |
eHEA: Capability flag for DLPAR support
This patch introduces a capability flag that is used by the DLPAR userspace
tool to check which DLPAR features are supported by the eHEA driver.
Missing goto has been included.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index bdb52419dbf5..383144db4d18 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2923,6 +2923,15 @@ static int check_module_parm(void) return ret; } +static ssize_t ehea_show_capabilities(struct device_driver *drv, + char *buf) +{ + return sprintf(buf, "%d", EHEA_CAPABILITIES); +} + +static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, + ehea_show_capabilities, NULL); + int __init ehea_module_init(void) { int ret; @@ -2934,8 +2943,19 @@ int __init ehea_module_init(void) if (ret) goto out; ret = ibmebus_register_driver(&ehea_driver); - if (ret) + if (ret) { ehea_error("failed registering eHEA device driver on ebus"); + goto out; + } + + ret = driver_create_file(&ehea_driver.driver, + &driver_attr_capabilities); + if (ret) { + ehea_error("failed to register capabilities attribute, ret=%d", + ret); + ibmebus_unregister_driver(&ehea_driver); + goto out; + } out: return ret; @@ -2943,6 +2963,7 @@ out: static void __exit ehea_module_exit(void) { + driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities); ibmebus_unregister_driver(&ehea_driver); } |