git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linus' into core/generic-dma-coherent
[pandora-kernel.git]
/
arch
/
powerpc
/
sysdev
/
ipic.c
diff --git
a/arch/powerpc/sysdev/ipic.c
b/arch/powerpc/sysdev/ipic.c
index
ae0dbf4
..
caba1c0
100644
(file)
--- a/
arch/powerpc/sysdev/ipic.c
+++ b/
arch/powerpc/sysdev/ipic.c
@@
-725,25
+725,21
@@
struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
struct resource res;
u32 temp = 0, ret;
struct resource res;
u32 temp = 0, ret;
+ ret = of_address_to_resource(node, 0, &res);
+ if (ret)
+ return NULL;
+
ipic = alloc_bootmem(sizeof(struct ipic));
if (ipic == NULL)
return NULL;
memset(ipic, 0, sizeof(struct ipic));
ipic = alloc_bootmem(sizeof(struct ipic));
if (ipic == NULL)
return NULL;
memset(ipic, 0, sizeof(struct ipic));
- ipic->irqhost = irq_alloc_host(
of_node_get(node)
, IRQ_HOST_MAP_LINEAR,
+ ipic->irqhost = irq_alloc_host(
node
, IRQ_HOST_MAP_LINEAR,
NR_IPIC_INTS,
&ipic_host_ops, 0);
NR_IPIC_INTS,
&ipic_host_ops, 0);
- if (ipic->irqhost == NULL) {
- of_node_put(node);
- return NULL;
- }
-
- ret = of_address_to_resource(node, 0, &res);
- if (ret) {
- of_node_put(node);
+ if (ipic->irqhost == NULL)
return NULL;
return NULL;
- }
ipic->regs = ioremap(res.start, res.end - res.start + 1);
ipic->regs = ioremap(res.start, res.end - res.start + 1);
@@
-906,7
+902,7
@@
static int __init init_ipic_sysfs(void)
{
int rc;
{
int rc;
- if (!primary_ipic->regs)
+ if (!primary_ipic
|| !primary_ipic
->regs)
return -ENODEV;
printk(KERN_DEBUG "Registering ipic with sysfs...\n");
return -ENODEV;
printk(KERN_DEBUG "Registering ipic with sysfs...\n");