mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
fix flash driver fixes, call request_mem_region/ioremap_nocache with the correct arguments
SVN-Revision: 9496
This commit is contained in:
parent
db87e1f8c1
commit
05efcf6975
@ -220,14 +220,15 @@ static int adm5120_flash_initres(struct adm5120_flash_info *info)
|
|||||||
struct map_info *map = &info->amap.map;
|
struct map_info *map = &info->amap.map;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
info->res = request_mem_region(map->phys, map->size, map->name);
|
info->res = request_mem_region(map->phys, info->amap.window_size,
|
||||||
|
map->name);
|
||||||
if (info->res == NULL) {
|
if (info->res == NULL) {
|
||||||
MAP_ERR(map, "could not reserve memory region\n");
|
MAP_ERR(map, "could not reserve memory region\n");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
map->virt = ioremap_nocache(map->phys, map->size);
|
map->virt = ioremap_nocache(map->phys, info->amap.window_size);
|
||||||
if (map->virt == NULL) {
|
if (map->virt == NULL) {
|
||||||
MAP_ERR(map, "failed to ioremap flash region\n");
|
MAP_ERR(map, "failed to ioremap flash region\n");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user