#define RTAS_USER_REGION_SIZE (64 * 1024)
 
 /* RTAS return status codes */
+#define RTAS_HARDWARE_ERROR    -1    /* Hardware Error */
 #define RTAS_BUSY              -2    /* RTAS Busy */
+#define RTAS_INVALID_PARAMETER -3    /* Invalid indicator/domain/sensor etc. */
 #define RTAS_EXTENDED_DELAY_MIN        9900
 #define RTAS_EXTENDED_DELAY_MAX        9905
 
 extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
 extern void rtas_progress(char *s, unsigned short hex);
 int rtas_ibm_suspend_me(int *fw_status);
+int rtas_error_rc(int rtas_rc);
 
 struct rtc_time;
 extern time64_t rtas_get_boot_time(void);
 
 }
 EXPORT_SYMBOL_GPL(rtas_busy_delay);
 
-static int rtas_error_rc(int rtas_rc)
+int rtas_error_rc(int rtas_rc)
 {
        int rc;
 
        switch (rtas_rc) {
-               case -1:                /* Hardware Error */
-                       rc = -EIO;
-                       break;
-               case -3:                /* Bad indicator/domain/etc */
-                       rc = -EINVAL;
-                       break;
-               case -9000:             /* Isolation error */
-                       rc = -EFAULT;
-                       break;
-               case -9001:             /* Outstanding TCE/PTE */
-                       rc = -EEXIST;
-                       break;
-               case -9002:             /* No usable slot */
-                       rc = -ENODEV;
-                       break;
-               default:
-                       pr_err("%s: unexpected error %d\n", __func__, rtas_rc);
-                       rc = -ERANGE;
-                       break;
+       case RTAS_HARDWARE_ERROR:       /* Hardware Error */
+               rc = -EIO;
+               break;
+       case RTAS_INVALID_PARAMETER:    /* Bad indicator/domain/etc */
+               rc = -EINVAL;
+               break;
+       case -9000:                     /* Isolation error */
+               rc = -EFAULT;
+               break;
+       case -9001:                     /* Outstanding TCE/PTE */
+               rc = -EEXIST;
+               break;
+       case -9002:                     /* No usable slot */
+               rc = -ENODEV;
+               break;
+       default:
+               pr_err("%s: unexpected error %d\n", __func__, rtas_rc);
+               rc = -ERANGE;
+               break;
        }
        return rc;
 }
+EXPORT_SYMBOL_GPL(rtas_error_rc);
 
 int rtas_get_power_level(int powerdomain, int *level)
 {