Merge git://git.infradead.org/battery-2.6
[pandora-kernel.git] / fs / udf / super.c
index 8f02b30..9fb18a3 100644 (file)
@@ -56,6 +56,7 @@
 #include <linux/mount.h>
 #include <linux/seq_file.h>
 #include <linux/bitmap.h>
+#include <linux/crc-itu-t.h>
 #include <asm/byteorder.h>
 
 #include "udf_sb.h"
@@ -239,7 +240,7 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count)
        sbi->s_partmaps = kcalloc(count, sizeof(struct udf_part_map),
                                  GFP_KERNEL);
        if (!sbi->s_partmaps) {
-               udf_error(sb, __FUNCTION__,
+               udf_error(sb, __func__,
                          "Unable to allocate space for %d partition maps",
                          count);
                sbi->s_partitions = 0;
@@ -608,7 +609,8 @@ static int udf_vrs(struct super_block *sb, int silent)
        sector += (sbi->s_session << sb->s_blocksize_bits);
 
        udf_debug("Starting at sector %u (%ld byte sectors)\n",
-                 (sector >> sb->s_blocksize_bits), sb->s_blocksize);
+                 (unsigned int)(sector >> sb->s_blocksize_bits),
+                 sb->s_blocksize);
        /* Process the sequence (if applicable) */
        for (; !nsr02 && !nsr03; sector += sectorsize) {
                /* Read a block */
@@ -1084,7 +1086,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
                bitmap = vmalloc(size); /* TODO: get rid of vmalloc */
 
        if (bitmap == NULL) {
-               udf_error(sb, __FUNCTION__,
+               udf_error(sb, __func__,
                          "Unable to allocate space for bitmap "
                          "and %d buffer_head pointers", nr_groups);
                return NULL;
@@ -1117,8 +1119,8 @@ static int udf_fill_partdesc_info(struct super_block *sb,
        if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE))
                map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE;
 
-       udf_debug("Partition (%d:%d type %x) starts at physical %d, "
-                 "block length %d\n", partitionNumber, p_index,
+       udf_debug("Partition (%d type %x) starts at physical %d, "
+                 "block length %d\n", p_index,
                  map->s_partition_type, map->s_partition_root,
                  map->s_partition_len);
 
@@ -1764,8 +1766,8 @@ static void udf_open_lvid(struct super_block *sb)
        lvid->integrityType = LVID_INTEGRITY_TYPE_OPEN;
 
        lvid->descTag.descCRC = cpu_to_le16(
-               udf_crc((char *)lvid + sizeof(tag),
-                       le16_to_cpu(lvid->descTag.descCRCLength), 0));
+               crc_itu_t(0, (char *)lvid + sizeof(tag),
+                       le16_to_cpu(lvid->descTag.descCRCLength)));
 
        lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag);
        mark_buffer_dirty(bh);
@@ -1799,9 +1801,8 @@ static void udf_close_lvid(struct super_block *sb)
        lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_CLOSE);
 
        lvid->descTag.descCRC = cpu_to_le16(
-               udf_crc((char *)lvid + sizeof(tag),
-                       le16_to_cpu(lvid->descTag.descCRCLength),
-                       0));
+                       crc_itu_t(0, (char *)lvid + sizeof(tag),
+                               le16_to_cpu(lvid->descTag.descCRCLength)));
 
        lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag);
        mark_buffer_dirty(bh);