]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/ufs/util.c
[PATCH] ufs: wrong type cast
[linux-beck.git] / fs / ufs / util.c
index 72f91cc84bfe6a47f8db22f41b6abc520f16aa1d..f9556bc484efbf4488026ad839d2a2d8959f6e7c 100644 (file)
@@ -63,17 +63,17 @@ struct ufs_buffer_head * ubh_bread_uspi (struct ufs_sb_private_info * uspi,
        count = size >> uspi->s_fshift;
        if (count <= 0 || count > UFS_MAXFRAG)
                return NULL;
-       USPI_UBH->fragment = fragment;
-       USPI_UBH->count = count;
+       USPI_UBH(uspi)->fragment = fragment;
+       USPI_UBH(uspi)->count = count;
        for (i = 0; i < count; i++)
-               if (!(USPI_UBH->bh[i] = sb_bread(sb, fragment + i)))
+               if (!(USPI_UBH(uspi)->bh[i] = sb_bread(sb, fragment + i)))
                        goto failed;
        for (; i < UFS_MAXFRAG; i++)
-               USPI_UBH->bh[i] = NULL;
-       return USPI_UBH;
+               USPI_UBH(uspi)->bh[i] = NULL;
+       return USPI_UBH(uspi);
 failed:
        for (j = 0; j < i; j++)
-               brelse (USPI_UBH->bh[j]);
+               brelse (USPI_UBH(uspi)->bh[j]);
        return NULL;
 }
 
@@ -90,11 +90,11 @@ void ubh_brelse (struct ufs_buffer_head * ubh)
 void ubh_brelse_uspi (struct ufs_sb_private_info * uspi)
 {
        unsigned i;
-       if (!USPI_UBH)
+       if (!USPI_UBH(uspi))
                return;
-       for ( i = 0; i < USPI_UBH->count; i++ ) {
-               brelse (USPI_UBH->bh[i]);
-               USPI_UBH->bh[i] = NULL;
+       for ( i = 0; i < USPI_UBH(uspi)->count; i++ ) {
+               brelse (USPI_UBH(uspi)->bh[i]);
+               USPI_UBH(uspi)->bh[i] = NULL;
        }
 }