diff options
author | Frank Li <Frank.Li@freescale.com> | 2010-09-06 13:19:49 +0800 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2010-12-13 16:09:27 -0500 |
commit | 411eea2abcaae3bb80612f987bb1b8a36b5dd685 (patch) | |
tree | cd7f0a02411c02f9f14f78b54409386bae5e8249 /drivers/mtd | |
parent | afe8502b59a2fb8609c599cfbe4f7ad95cf079e2 (diff) |
ENGR00127171-5 Kernel Upgrade: Fix all drivers build error for mx23/mx28
Fix build error because kernel upgrade
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c | 1 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c | 22 | ||||
-rw-r--r-- | drivers/mtd/ubiblock.c | 6 |
3 files changed, 13 insertions, 16 deletions
diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c index 1400deb58e52..19982b1b5b95 100644 --- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c @@ -21,6 +21,7 @@ #include <linux/slab.h> #include "gpmi-nfc.h" +#include "linux/slab.h" /* * This structure contains the "safe" GPMI timing that should succeed with any diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c index cb5dc4d50e87..5a2325aa30a2 100644 --- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c @@ -21,6 +21,7 @@ #include <linux/slab.h> #include "gpmi-nfc.h" +#include "linux/slab.h" /* * Indicates the driver should register the MTD that represents the entire @@ -1887,16 +1888,13 @@ static int mil_boot_areas_init(struct gpmi_nfc_data *this) /* Find the general use MTD. */ - for (i = 0; i < MAX_MTD_DEVICES; i++) { - - /* Get the current MTD so we can examine it. */ - - search_mtd = get_mtd_device(0, i); + i = 0; + while (search_mtd = get_mtd_device(0, i)) { /* Check if we got nonsense. */ if ((!search_mtd) || (search_mtd == ERR_PTR(-ENODEV))) - continue; + break; /* Check if the current MTD is one of our remainders. */ @@ -1907,6 +1905,7 @@ static int mil_boot_areas_init(struct gpmi_nfc_data *this) put_mtd_device(search_mtd); + i++; } if (!mil->general_use_mtd) { @@ -1985,17 +1984,13 @@ static int mil_boot_areas_init(struct gpmi_nfc_data *this) add_mtd_partitions(mtd, partitions, 4); /* Find the remainder partitions. */ - - for (i = 0; i < MAX_MTD_DEVICES; i++) { - - /* Get the current MTD so we can examine it. */ - - search_mtd = get_mtd_device(0, i); + i = 0; + while (search_mtd = get_mtd_device(0, i)) { /* Check if we got nonsense. */ if ((!search_mtd) || (search_mtd == ERR_PTR(-ENODEV))) - continue; + break; /* Check if the current MTD is one of our remainders. */ @@ -2009,6 +2004,7 @@ static int mil_boot_areas_init(struct gpmi_nfc_data *this) put_mtd_device(search_mtd); + i++; } if (!chip_0_remainder_mtd || !medium_remainder_mtd) { diff --git a/drivers/mtd/ubiblock.c b/drivers/mtd/ubiblock.c index a2327f5d1014..6c75d98daca7 100644 --- a/drivers/mtd/ubiblock.c +++ b/drivers/mtd/ubiblock.c @@ -3,7 +3,7 @@ * * Author: dmitry pervushin <dimka@embeddedalley.com> * - * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2008-2010 Freescale Semiconductor, Inc. * Copyright 2008 Embedded Alley Solutions, Inc. All Rights Reserved. * * The code contained herein is licensed under the GNU General Public @@ -496,7 +496,7 @@ static void *ubiblk_add_locked(int ubi_num, int ubi_vol_id) list_add_tail(&u->list, &ubiblk_devices); add_mtd_blktrans_dev(&u->m); - ubiblk_sysfs(u->m.blkcore_priv, true); + ubiblk_sysfs(u->m.priv, true); out: return u; } @@ -514,7 +514,7 @@ static int ubiblk_del_locked(struct ubiblk_dev *u) { if (u->usecount != 0) return -EBUSY; - ubiblk_sysfs(u->m.blkcore_priv, false); + ubiblk_sysfs(u->m.priv, false); del_mtd_blktrans_dev(&u->m); list_del(&u->list); BUG_ON(u->cache_data != NULL); /* who did not free the cache ?! */ |