aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
authorJan-Bernd Themann <ossthema@de.ibm.com>2007-07-05 03:26:25 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-10 12:59:41 -0400
commit4c3ca4da8086c3c9fcc81dccc387c34bee6b755e (patch)
treec08bec3d3b32c2a94196e0cf058aaf10ed6f1d87 /drivers/net/ehea/ehea_main.c
parente1abecc48938fbe1966ea6e78267fc673fa59295 (diff)
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.c23
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)
2923 return ret; 2923 return ret;
2924} 2924}
2925 2925
2926static ssize_t ehea_show_capabilities(struct device_driver *drv,
2927 char *buf)
2928{
2929 return sprintf(buf, "%d", EHEA_CAPABILITIES);
2930}
2931
2932static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
2933 ehea_show_capabilities, NULL);
2934
2926int __init ehea_module_init(void) 2935int __init ehea_module_init(void)
2927{ 2936{
2928 int ret; 2937 int ret;
@@ -2934,8 +2943,19 @@ int __init ehea_module_init(void)
2934 if (ret) 2943 if (ret)
2935 goto out; 2944 goto out;
2936 ret = ibmebus_register_driver(&ehea_driver); 2945 ret = ibmebus_register_driver(&ehea_driver);
2937 if (ret) 2946 if (ret) {
2938 ehea_error("failed registering eHEA device driver on ebus"); 2947 ehea_error("failed registering eHEA device driver on ebus");
2948 goto out;
2949 }
2950
2951 ret = driver_create_file(&ehea_driver.driver,
2952 &driver_attr_capabilities);
2953 if (ret) {
2954 ehea_error("failed to register capabilities attribute, ret=%d",
2955 ret);
2956 ibmebus_unregister_driver(&ehea_driver);
2957 goto out;
2958 }
2939 2959
2940out: 2960out:
2941 return ret; 2961 return ret;
@@ -2943,6 +2963,7 @@ out:
2943 2963
2944static void __exit ehea_module_exit(void) 2964static void __exit ehea_module_exit(void)
2945{ 2965{
2966 driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities);
2946 ibmebus_unregister_driver(&ehea_driver); 2967 ibmebus_unregister_driver(&ehea_driver);
2947} 2968}
2948 2969