Skip to content

Commit

Permalink
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
Browse files Browse the repository at this point in the history
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
  spi/spi_sh_msiof: fix a wrong free_irq() parameter
  dt/flattree: Return virtual address from early_init_dt_alloc_memory_arch()
  • Loading branch information
torvalds committed Jan 17, 2011
2 parents 1a47f7a + d95defa commit 8c34482
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
4 changes: 2 additions & 2 deletions arch/microblaze/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memblock_add(base, size);
}

u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
return memblock_alloc(size, align);
return __va(memblock_alloc(size, align));
}

#ifdef CONFIG_EARLY_PRINTK
Expand Down
6 changes: 2 additions & 4 deletions arch/mips/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ void __init free_mem_mach(unsigned long addr, unsigned long size)
return free_bootmem(addr, size);
}

u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
return virt_to_phys(
__alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS))
);
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
}

#ifdef CONFIG_BLK_DEV_INITRD
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memblock_add(base, size);
}

u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
return memblock_alloc(size, align);
return __va(memblock_alloc(size, align));
}

#ifdef CONFIG_BLK_DEV_INITRD
Expand Down
8 changes: 1 addition & 7 deletions drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,12 +692,6 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
return 1;
}

static void *__init early_device_tree_alloc(u64 size, u64 align)
{
unsigned long mem = early_init_dt_alloc_memory_arch(size, align);
return __va(mem);
}

/**
* unflatten_device_tree - create tree of device_nodes from flat blob
*
Expand All @@ -709,7 +703,7 @@ static void *__init early_device_tree_alloc(u64 size, u64 align)
void __init unflatten_device_tree(void)
{
__unflatten_device_tree(initial_boot_params, &allnodes,
early_device_tree_alloc);
early_init_dt_alloc_memory_arch);

/* Get pointer to OF "/chosen" node for use everywhere */
of_chosen = of_find_node_by_path("/chosen");
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_sh_msiof.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static int sh_msiof_spi_remove(struct platform_device *pdev)
ret = spi_bitbang_stop(&p->bitbang);
if (!ret) {
pm_runtime_disable(&pdev->dev);
free_irq(platform_get_irq(pdev, 0), sh_msiof_spi_irq);
free_irq(platform_get_irq(pdev, 0), p);
iounmap(p->mapbase);
clk_put(p->clk);
spi_master_put(p->bitbang.master);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/of_fdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
int depth, void *data);
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align);
extern u64 dt_mem_next_cell(int s, __be32 **cellp);

/*
Expand Down

0 comments on commit 8c34482

Please sign in to comment.