- patches.apparmor/remove_suid_new_case_in_2.6.22.diff: Merge fix.
[linux-flexiantxendom0-3.2.10.git] / arch / powerpc / sysdev / qe_lib / ucc_slow.c
index 817df73..1f65c26 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/slab.h>
 #include <linux/stddef.h>
 #include <linux/interrupt.h>
+#include <linux/err.h>
 
 #include <asm/io.h>
 #include <asm/immap_qe.h>
@@ -175,7 +176,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
        /* Get PRAM base */
        uccs->us_pram_offset =
                qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM);
-       if (IS_MURAM_ERR(uccs->us_pram_offset)) {
+       if (IS_ERR_VALUE(uccs->us_pram_offset)) {
                printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __FUNCTION__);
                ucc_slow_free(uccs);
                return -ENOMEM;
@@ -187,7 +188,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
        uccs->us_pram = qe_muram_addr(uccs->us_pram_offset);
 
        /* Init Guemr register */
-       if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) {
+       if ((ret = ucc_init_guemr((struct ucc_common *) us_regs))) {
                printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__);
                ucc_slow_free(uccs);
                return ret;
@@ -195,7 +196,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
 
        /* Set UCC to slow type */
        if ((ret = ucc_set_type(us_info->ucc_num,
-                               (struct ucc_common *) (us_info->regs),
+                               (struct ucc_common *) us_regs,
                                UCC_SPEED_TYPE_SLOW))) {
                printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__);
                ucc_slow_free(uccs);
@@ -210,7 +211,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
        uccs->rx_base_offset =
                qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd),
                                QE_ALIGNMENT_OF_BD);
-       if (IS_MURAM_ERR(uccs->rx_base_offset)) {
+       if (IS_ERR_VALUE(uccs->rx_base_offset)) {
                printk(KERN_ERR "%s: cannot allocate RX BDs", __FUNCTION__);
                uccs->rx_base_offset = 0;
                ucc_slow_free(uccs);
@@ -220,7 +221,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
        uccs->tx_base_offset =
                qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd),
                        QE_ALIGNMENT_OF_BD);
-       if (IS_MURAM_ERR(uccs->tx_base_offset)) {
+       if (IS_ERR_VALUE(uccs->tx_base_offset)) {
                printk(KERN_ERR "%s: cannot allocate TX BDs", __FUNCTION__);
                uccs->tx_base_offset = 0;
                ucc_slow_free(uccs);