[POWERPC] iSeries: fix viocd init
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 15 Dec 2006 04:44:04 +0000 (15:44 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 20 Dec 2006 05:37:48 +0000 (16:37 +1100)
Only initialise viocd on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/cdrom/viocd.c

index 54ca931e19ea0a0c0b36bc896432278dc1361812..93fbf84dcc4a5d48dbd09d34d4ceb6cd3807ea20 100644 (file)
@@ -47,6 +47,7 @@
 #include <asm/iseries/hv_types.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/vio.h>
+#include <asm/firmware.h>
 
 #define VIOCD_DEVICE                   "iseries/vcd"
 
@@ -748,6 +749,9 @@ static int __init viocd_init(void)
        struct proc_dir_entry *e;
        int ret = 0;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return -ENODEV;
+
        if (viopath_hostLp == HvLpIndexInvalid) {
                vio_set_hostlp();
                /* If we don't have a host, bail out */