X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=fs%2Fjffs%2Fjffs_fm.c;h=29b68d939bd9e9f6f9c8bd0572d1b157f2476dcd;hb=ccaa36f73544163ef6e15eb29a620130755f6001;hp=053e3a98a276ec1f63d0a7035355d06b94474cdd;hpb=1d492eb41371d9a5145651e8eb64bea1042a4057;p=powerpc.git diff --git a/fs/jffs/jffs_fm.c b/fs/jffs/jffs_fm.c index 053e3a98a2..29b68d939b 100644 --- a/fs/jffs/jffs_fm.c +++ b/fs/jffs/jffs_fm.c @@ -20,6 +20,7 @@ #include #include #include "jffs_fm.h" +#include "intrep.h" #if defined(JFFS_MARK_OBSOLETE) && JFFS_MARK_OBSOLETE static int jffs_mark_obsolete(struct jffs_fmcontrol *fmc, __u32 fm_offset); @@ -93,8 +94,7 @@ jffs_build_begin(struct jffs_control *c, int unit) struct mtd_info *mtd; D3(printk("jffs_build_begin()\n")); - fmc = (struct jffs_fmcontrol *)kmalloc(sizeof(struct jffs_fmcontrol), - GFP_KERNEL); + fmc = kmalloc(sizeof(*fmc), GFP_KERNEL); if (!fmc) { D(printk("jffs_build_begin(): Allocation of " "struct jffs_fmcontrol failed!\n")); @@ -138,7 +138,7 @@ jffs_build_begin(struct jffs_control *c, int unit) fmc->tail = NULL; fmc->head_extra = NULL; fmc->tail_extra = NULL; - init_MUTEX(&fmc->biglock); + mutex_init(&fmc->biglock); return fmc; } @@ -485,8 +485,7 @@ jffs_add_node(struct jffs_node *node) D3(printk("jffs_add_node(): ino = %u\n", node->ino)); - ref = (struct jffs_node_ref *)kmalloc(sizeof(struct jffs_node_ref), - GFP_KERNEL); + ref = kmalloc(sizeof(*ref), GFP_KERNEL); if (!ref) return -ENOMEM;