git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: make snd_ctl_elem_read() and snd_ctl_elem_write() static
[safe/jmp/linux-2.6]
/
drivers
/
mtd
/
maps
/
tqm8xxl.c
diff --git
a/drivers/mtd/maps/tqm8xxl.c
b/drivers/mtd/maps/tqm8xxl.c
index
9cb5d67
..
5217340
100644
(file)
--- a/
drivers/mtd/maps/tqm8xxl.c
+++ b/
drivers/mtd/maps/tqm8xxl.c
@@
-22,7
+22,6
@@
* Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at
* kernel configuration.
*/
* Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at
* kernel configuration.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-125,7
+124,7
@@
int __init init_tqm_mtd(void)
//request maximum flash size address space
start_scan_addr = ioremap(flash_addr, flash_size);
if (!start_scan_addr) {
//request maximum flash size address space
start_scan_addr = ioremap(flash_addr, flash_size);
if (!start_scan_addr) {
- printk(KERN_WARNING "%s:Failed to ioremap address:0x%x\n", __
FUNCTION
__, flash_addr);
+ printk(KERN_WARNING "%s:Failed to ioremap address:0x%x\n", __
func
__, flash_addr);
return -EIO;
}
return -EIO;
}
@@
-133,16
+132,15
@@
int __init init_tqm_mtd(void)
if(mtd_size >= flash_size)
break;
if(mtd_size >= flash_size)
break;
- printk(KERN_INFO "%s: chip probing count %d\n", __
FUNCTION
__, idx);
+ printk(KERN_INFO "%s: chip probing count %d\n", __
func
__, idx);
- map_banks[idx] =
(struct map_info *)km
alloc(sizeof(struct map_info), GFP_KERNEL);
+ map_banks[idx] =
kz
alloc(sizeof(struct map_info), GFP_KERNEL);
if(map_banks[idx] == NULL) {
ret = -ENOMEM;
/* FIXME: What if some MTD devices were probed already? */
goto error_mem;
}
if(map_banks[idx] == NULL) {
ret = -ENOMEM;
/* FIXME: What if some MTD devices were probed already? */
goto error_mem;
}
- memset((void *)map_banks[idx], 0, sizeof(struct map_info));
map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL);
if (!map_banks[idx]->name) {
map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL);
if (!map_banks[idx]->name) {
@@
-180,7
+178,7
@@
int __init init_tqm_mtd(void)
mtd_size += mtd_banks[idx]->size;
num_banks++;
mtd_size += mtd_banks[idx]->size;
num_banks++;
- printk(KERN_INFO "%s: bank%d, name:%s, size:%dbytes \n", __
FUNCTION
__, num_banks,
+ printk(KERN_INFO "%s: bank%d, name:%s, size:%dbytes \n", __
func
__, num_banks,
mtd_banks[idx]->name, mtd_banks[idx]->size);
}
}
mtd_banks[idx]->name, mtd_banks[idx]->size);
}
}
@@
-224,10
+222,8
@@
int __init init_tqm_mtd(void)
error_mem:
for(idx = 0 ; idx < FLASH_BANK_MAX ; idx++) {
if(map_banks[idx] != NULL) {
error_mem:
for(idx = 0 ; idx < FLASH_BANK_MAX ; idx++) {
if(map_banks[idx] != NULL) {
- if(map_banks[idx]->name != NULL) {
- kfree(map_banks[idx]->name);
- map_banks[idx]->name = NULL;
- }
+ kfree(map_banks[idx]->name);
+ map_banks[idx]->name = NULL;
kfree(map_banks[idx]);
map_banks[idx] = NULL;
}
kfree(map_banks[idx]);
map_banks[idx] = NULL;
}