aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 5959f91be240..329663188772 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -439,16 +439,18 @@ int ubi_io_write_vid_hdr(const struct ubi_device *ubi, int pnum,
439/** 439/**
440 * ubi_zalloc_vid_hdr - allocate a volume identifier header object. 440 * ubi_zalloc_vid_hdr - allocate a volume identifier header object.
441 * @ubi: UBI device description object 441 * @ubi: UBI device description object
442 * @gfp_flags: GFP flags to allocate with
442 * 443 *
443 * This function returns a pointer to the newly allocated and zero-filled 444 * This function returns a pointer to the newly allocated and zero-filled
444 * volume identifier header object in case of success and %NULL in case of 445 * volume identifier header object in case of success and %NULL in case of
445 * failure. 446 * failure.
446 */ 447 */
447static inline struct ubi_vid_hdr *ubi_zalloc_vid_hdr(const struct ubi_device *ubi) 448static inline struct ubi_vid_hdr *
449ubi_zalloc_vid_hdr(const struct ubi_device *ubi, gfp_t gfp_flags)
448{ 450{
449 void *vid_hdr; 451 void *vid_hdr;
450 452
451 vid_hdr = kzalloc(ubi->vid_hdr_alsize, GFP_KERNEL); 453 vid_hdr = kzalloc(ubi->vid_hdr_alsize, gfp_flags);
452 if (!vid_hdr) 454 if (!vid_hdr)
453 return NULL; 455 return NULL;
454 456