diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2008-01-02 12:50:01 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-01-23 20:34:18 -0500 |
commit | e5091842dc067c0c9ae0d8a26f9e2eecf7df34f3 (patch) | |
tree | 43db0186fad87f431600d5da59e59faec81c7448 | |
parent | d7584ed2b994a572326650b0c4d2c25961e6f49d (diff) |
[POWERPC] 85xx: mpc85xx_ads: add in missing of_node_put()
Add in missing of_node_put() after cpm2_pic_init(). This and other coding
style cleanups as suggested by Stephen Rothwell.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index eb0a46bb1ccc..4e0305096114 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -52,9 +52,9 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | |||
52 | { | 52 | { |
53 | int cascade_irq; | 53 | int cascade_irq; |
54 | 54 | ||
55 | while ((cascade_irq = cpm2_get_irq()) >= 0) { | 55 | while ((cascade_irq = cpm2_get_irq()) >= 0) |
56 | generic_handle_irq(cascade_irq); | 56 | generic_handle_irq(cascade_irq); |
57 | } | 57 | |
58 | desc->chip->eoi(irq); | 58 | desc->chip->eoi(irq); |
59 | } | 59 | } |
60 | 60 | ||
@@ -70,13 +70,12 @@ static void __init mpc85xx_ads_pic_init(void) | |||
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | np = of_find_node_by_type(np, "open-pic"); | 72 | np = of_find_node_by_type(np, "open-pic"); |
73 | 73 | if (!np) { | |
74 | if (np == NULL) { | ||
75 | printk(KERN_ERR "Could not find open-pic node\n"); | 74 | printk(KERN_ERR "Could not find open-pic node\n"); |
76 | return; | 75 | return; |
77 | } | 76 | } |
78 | 77 | ||
79 | if(of_address_to_resource(np, 0, &r)) { | 78 | if (of_address_to_resource(np, 0, &r)) { |
80 | printk(KERN_ERR "Could not map mpic register space\n"); | 79 | printk(KERN_ERR "Could not map mpic register space\n"); |
81 | of_node_put(np); | 80 | of_node_put(np); |
82 | return; | 81 | return; |
@@ -100,6 +99,7 @@ static void __init mpc85xx_ads_pic_init(void) | |||
100 | irq = irq_of_parse_and_map(np, 0); | 99 | irq = irq_of_parse_and_map(np, 0); |
101 | 100 | ||
102 | cpm2_pic_init(np); | 101 | cpm2_pic_init(np); |
102 | of_node_put(np); | ||
103 | set_irq_chained_handler(irq, cpm2_cascade); | 103 | set_irq_chained_handler(irq, cpm2_cascade); |
104 | #endif | 104 | #endif |
105 | } | 105 | } |
@@ -112,7 +112,7 @@ struct cpm_pin { | |||
112 | int port, pin, flags; | 112 | int port, pin, flags; |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct cpm_pin mpc8560_ads_pins[] = { | 115 | static const struct cpm_pin mpc8560_ads_pins[] = { |
116 | /* SCC1 */ | 116 | /* SCC1 */ |
117 | {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 117 | {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
118 | {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | 118 | {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, |