Commit 66f57b16 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] misc mtd sparse fixes

 * jedec - switched to C99 initializers
 * sun_uflash - removed bogus cast to void * in argument of iounmap() +
   NULL noise removal.
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4892cb2f
...@@ -1302,7 +1302,7 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1302,7 +1302,7 @@ static const struct amd_flash_info jedec_table[] = {
.DevSize = SIZE_256KiB, .DevSize = SIZE_256KiB,
.CmdSet = P_ID_SST_PAGE, .CmdSet = P_ID_SST_PAGE,
.NumEraseRegions= 1, .NumEraseRegions= 1,
regions: {ERASEINFO(0x01000,64), .regions = {ERASEINFO(0x01000,64),
} }
}, { }, {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
...@@ -1314,7 +1314,7 @@ static const struct amd_flash_info jedec_table[] = { ...@@ -1314,7 +1314,7 @@ static const struct amd_flash_info jedec_table[] = {
.DevSize = SIZE_256KiB, .DevSize = SIZE_256KiB,
.CmdSet = P_ID_SST_PAGE, .CmdSet = P_ID_SST_PAGE,
.NumEraseRegions= 1, .NumEraseRegions= 1,
regions: {ERASEINFO(0x01000,64), .regions = {ERASEINFO(0x01000,64),
} }
}, { }, {
.mfr_id = MANUFACTURER_SST, .mfr_id = MANUFACTURER_SST,
......
...@@ -109,7 +109,7 @@ int uflash_devinit(struct linux_ebus_device* edev) ...@@ -109,7 +109,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
/* MTD registration */ /* MTD registration */
pdev->mtd = do_map_probe("cfi_probe", &pdev->map); pdev->mtd = do_map_probe("cfi_probe", &pdev->map);
if(0 == pdev->mtd) { if(0 == pdev->mtd) {
iounmap((void *)pdev->map.virt); iounmap(pdev->map.virt);
kfree(pdev->name); kfree(pdev->name);
kfree(pdev); kfree(pdev);
return(-ENXIO); return(-ENXIO);
...@@ -163,8 +163,8 @@ static void __exit uflash_cleanup(void) ...@@ -163,8 +163,8 @@ static void __exit uflash_cleanup(void)
map_destroy(udev->mtd); map_destroy(udev->mtd);
} }
if(0 != udev->map.virt) { if(0 != udev->map.virt) {
iounmap((void*)udev->map.virt); iounmap(udev->map.virt);
udev->map.virt = 0; udev->map.virt = NULL;
} }
if(0 != udev->name) { if(0 != udev->name) {
kfree(udev->name); kfree(udev->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment