mtd: remove superfluous name casts

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 28 00:59:01 EST 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7c4bb4f8f8ad6d3cc338d59c00f674a571ae7ca6
Commit:     7c4bb4f8f8ad6d3cc338d59c00f674a571ae7ca6
Parent:     76c930be3d4831b52d04aadc2522cfeeb7a6c789
Author:     Geert Uytterhoeven <geert at linux-m68k.org>
AuthorDate: Tue Nov 12 20:07:15 2013 +0100
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Jan 3 11:22:08 2014 -0800

    mtd: remove superfluous name casts
    
    map_info.name is "const char *"
    
    Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
    Cc: David Woodhouse <dwmw2 at infradead.org>
    Cc: linux-mtd at lists.infradead.org
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/maps/pxa2xx-flash.c | 2 +-
 drivers/mtd/maps/sun_uflash.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index d210d13..63b52f7 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -61,7 +61,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)
 	if (!info)
 		return -ENOMEM;
 
-	info->map.name = (char *) flash->name;
+	info->map.name = flash->name;
 	info->map.bankwidth = flash->width;
 	info->map.phys = res->start;
 	info->map.size = resource_size(res);
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index d467f3b..39cc418 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -75,7 +75,7 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp)
 
 	up->name = of_get_property(dp, "model", NULL);
 	if (up->name && 0 < strlen(up->name))
-		up->map.name = (char *)up->name;
+		up->map.name = up->name;
 
 	up->map.phys = op->resource[0].start;
 



More information about the linux-mtd-cvs mailing list