From: Stephen Rothwell Date: Fri, 15 Dec 2006 04:42:50 +0000 (+1100) Subject: [POWERPC] iSeries: fix iseries_veth init X-Git-Tag: v2.6.20-rc2~84^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=687d18abed09315a531470a0edcae977ef6a7f9e;p=linux-2.6 [POWERPC] iSeries: fix iseries_veth init Only initialise iseries_veth on legacy iSeries. Make the init and exit routines static. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index d6f4f185bf..2194b56723 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c @@ -73,7 +73,7 @@ #include #include #include - +#include #include #include #include @@ -1668,7 +1668,7 @@ static struct vio_driver veth_driver = { * Module initialization/cleanup */ -void __exit veth_module_cleanup(void) +static void __exit veth_module_cleanup(void) { int i; struct veth_lpar_connection *cnx; @@ -1697,11 +1697,14 @@ void __exit veth_module_cleanup(void) } module_exit(veth_module_cleanup); -int __init veth_module_init(void) +static int __init veth_module_init(void) { int i; int rc; + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return -ENODEV; + this_lp = HvLpConfig_getLpIndex_outline(); for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {