aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-03-08 17:27:00 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-09 19:04:03 -0500
commit3a0adfab4a9773e70b5448a9dbc785a48d12d713 (patch)
tree797a9c059043fcf15ea5c7ed01179fc21bf765d4 /arch/powerpc/sysdev
parent41f3863bb050ba881aac6cc7be28fc0602cb629a (diff)
powerpc: sysdev/qe_lib/qe_ic irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_ic.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 541ba9863647..8c9ded8ea07c 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -189,15 +189,20 @@ static inline void qe_ic_write(volatile __be32 __iomem * base, unsigned int reg
189 189
190static inline struct qe_ic *qe_ic_from_irq(unsigned int virq) 190static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
191{ 191{
192 return irq_to_desc(virq)->chip_data; 192 return get_irq_chip_data(virq);
193}
194
195static inline struct qe_ic *qe_ic_from_irq_data(struct irq_data *d)
196{
197 return irq_data_get_irq_chip_data(d);
193} 198}
194 199
195#define virq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq) 200#define virq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
196 201
197static void qe_ic_unmask_irq(unsigned int virq) 202static void qe_ic_unmask_irq(struct irq_data *d)
198{ 203{
199 struct qe_ic *qe_ic = qe_ic_from_irq(virq); 204 struct qe_ic *qe_ic = qe_ic_from_irq_data(d);
200 unsigned int src = virq_to_hw(virq); 205 unsigned int src = virq_to_hw(d->irq);
201 unsigned long flags; 206 unsigned long flags;
202 u32 temp; 207 u32 temp;
203 208
@@ -210,10 +215,10 @@ static void qe_ic_unmask_irq(unsigned int virq)
210 raw_spin_unlock_irqrestore(&qe_ic_lock, flags); 215 raw_spin_unlock_irqrestore(&qe_ic_lock, flags);
211} 216}
212 217
213static void qe_ic_mask_irq(unsigned int virq) 218static void qe_ic_mask_irq(struct irq_data *d)
214{ 219{
215 struct qe_ic *qe_ic = qe_ic_from_irq(virq); 220 struct qe_ic *qe_ic = qe_ic_from_irq_data(d);
216 unsigned int src = virq_to_hw(virq); 221 unsigned int src = virq_to_hw(d->irq);
217 unsigned long flags; 222 unsigned long flags;
218 u32 temp; 223 u32 temp;
219 224
@@ -238,9 +243,9 @@ static void qe_ic_mask_irq(unsigned int virq)
238 243
239static struct irq_chip qe_ic_irq_chip = { 244static struct irq_chip qe_ic_irq_chip = {
240 .name = "QEIC", 245 .name = "QEIC",
241 .unmask = qe_ic_unmask_irq, 246 .irq_unmask = qe_ic_unmask_irq,
242 .mask = qe_ic_mask_irq, 247 .irq_mask = qe_ic_mask_irq,
243 .mask_ack = qe_ic_mask_irq, 248 .irq_mask_ack = qe_ic_mask_irq,
244}; 249};
245 250
246static int qe_ic_host_match(struct irq_host *h, struct device_node *node) 251static int qe_ic_host_match(struct irq_host *h, struct device_node *node)