Thread (3 messages) flat view 3 messages, 2 authors, 2007-07-04

Re: [PATCH 1/2] eHEA: Capability flag for DLPAR support

From: Jan-Bernd Themann <hidden>
Date: 2007-07-04 13:23:20
Also in: lkml, netdev

Hi,

good catch.

Thanks

On Wednesday 04 July 2007 14:53, Akinobu Mita wrote:
2007/7/4, Jan-Bernd Themann [off-list ref]:
quoted
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index bdb5241..f8c0908 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;
@@ -2937,12 +2946,20 @@ int __init ehea_module_init(void)
        if (ret)
                ehea_error("failed registering eHEA device driver on ebus");
You forgot to put:
                return ret;
or
                goto out;
quoted
+       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;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help