/*
  *  drivers/s390/cio/cio.c
  *   S/390 common I/O routines -- low level i/o calls
- *   $Revision: 1.134 $
+ *   $Revision: 1.135 $
  *
  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
  *                           IBM Corporation
                struct tpi_info ti;
 
                if (tpi(&ti)) {
-                       tsch(schid, (struct irb *)__LC_IRB);
-                       return 0;
+                       tsch(ti.irq, (struct irb *)__LC_IRB);
+                       if (ti.irq == schid)
+                               return 0;
                }
                udelay(100);
        }
 
  * Some S390 specific IO instructions as inline
  */
 
-extern __inline__ int stsch(int irq, volatile struct schib *addr)
+static inline int stsch(int irq, volatile struct schib *addr)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int msch(int irq, volatile struct schib *addr)
+static inline int msch(int irq, volatile struct schib *addr)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int msch_err(int irq, volatile struct schib *addr)
+static inline int msch_err(int irq, volatile struct schib *addr)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int tsch(int irq, volatile struct irb *addr)
+static inline int tsch(int irq, volatile struct irb *addr)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int tpi( volatile struct tpi_info *addr)
+static inline int tpi( volatile struct tpi_info *addr)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int ssch(int irq, volatile struct orb *addr)
+static inline int ssch(int irq, volatile struct orb *addr)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int rsch(int irq)
+static inline int rsch(int irq)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int csch(int irq)
+static inline int csch(int irq)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int hsch(int irq)
+static inline int hsch(int irq)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int xsch(int irq)
+static inline int xsch(int irq)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int chsc(void *chsc_area)
+static inline int chsc(void *chsc_area)
 {
        int cc;
 
        return cc;
 }
 
-extern __inline__ int iac( void)
+static inline int iac( void)
 {
        int ccode;
 
        return ccode;
 }
 
-extern __inline__ int rchp(int chpid)
+static inline int rchp(int chpid)
 {
        int ccode;