diff options
| author | Michael Ellerman <michael@ellerman.id.au> | 2008-05-26 12:12:31 +1000 | 
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-06-09 13:51:15 +1000 | 
| commit | 2272a55f16c998d916904bba018b0f40f430d744 (patch) | |
| tree | 8dd7212809b64ef3b665d8ecf66de9e1d3bad330 /arch/powerpc/sysdev | |
| parent | 84f1c1e08906f2206f2bbdd19e4ff6a0757ff7f8 (diff) | |
| download | olio-linux-3.10-2272a55f16c998d916904bba018b0f40f430d744.tar.xz olio-linux-3.10-2272a55f16c998d916904bba018b0f40f430d744.zip  | |
powerpc: Rework qe_ic_init() so we can avoid freeing the irq_host
If we do the call to of_address_to_resource() first, then we don't
need to worry about freeing the irq_host (which the code doesn't do
currently anyway).
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev')
| -rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe_ic.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index f59444d3be7..c11b313f015 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c @@ -329,6 +329,10 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,  	struct resource res;  	u32 temp = 0, ret, high_active = 0; +	ret = of_address_to_resource(node, 0, &res); +	if (ret) +		return; +  	qe_ic = alloc_bootmem(sizeof(struct qe_ic));  	if (qe_ic == NULL)  		return; @@ -342,10 +346,6 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,  		return;  	} -	ret = of_address_to_resource(node, 0, &res); -	if (ret) -		return; -  	qe_ic->regs = ioremap(res.start, res.end - res.start + 1);  	qe_ic->irqhost->host_data = qe_ic;  |