Commit 687d18ab authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Paul Mackerras

[POWERPC] iSeries: fix iseries_veth init

Only initialise iseries_veth on legacy iSeries.
Make the init and exit routines static.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent fd38451f
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
#include <asm/abs_addr.h> #include <asm/abs_addr.h>
#include <asm/iseries/mf.h> #include <asm/iseries/mf.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/firmware.h>
#include <asm/iseries/hv_lp_config.h> #include <asm/iseries/hv_lp_config.h>
#include <asm/iseries/hv_types.h> #include <asm/iseries/hv_types.h>
#include <asm/iseries/hv_lp_event.h> #include <asm/iseries/hv_lp_event.h>
...@@ -1668,7 +1668,7 @@ static struct vio_driver veth_driver = { ...@@ -1668,7 +1668,7 @@ static struct vio_driver veth_driver = {
* Module initialization/cleanup * Module initialization/cleanup
*/ */
void __exit veth_module_cleanup(void) static void __exit veth_module_cleanup(void)
{ {
int i; int i;
struct veth_lpar_connection *cnx; struct veth_lpar_connection *cnx;
...@@ -1697,11 +1697,14 @@ void __exit veth_module_cleanup(void) ...@@ -1697,11 +1697,14 @@ void __exit veth_module_cleanup(void)
} }
module_exit(veth_module_cleanup); module_exit(veth_module_cleanup);
int __init veth_module_init(void) static int __init veth_module_init(void)
{ {
int i; int i;
int rc; int rc;
if (!firmware_has_feature(FW_FEATURE_ISERIES))
return -ENODEV;
this_lp = HvLpConfig_getLpIndex_outline(); this_lp = HvLpConfig_getLpIndex_outline();
for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) { for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment