aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-30 00:43:52 -0400
committerMike Frysinger <vapier@gentoo.org>2011-05-25 08:13:41 -0400
commite9e334c35ec3cd262d13640b50b67a29870a7105 (patch)
treebdbca850665100a44fad32317fcebdc68614abe7 /arch/blackfin/mach-common
parentbc6b92f8c31788a2fdc65d9be903983e5da78921 (diff)
Blackfin: ints-priority: clean up some local vars
The local ivg structs need not be exported, so mark them as static. Further, the "num_spurious" variable is only incremented and never actually read anywhere, so punt it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/ints-priority.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 43d9fb195c1e..59e0efc98e23 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -63,22 +63,19 @@ unsigned long bfin_irq_flags = 0x1f;
63EXPORT_SYMBOL(bfin_irq_flags); 63EXPORT_SYMBOL(bfin_irq_flags);
64#endif 64#endif
65 65
66/* The number of spurious interrupts */
67atomic_t num_spurious;
68
69#ifdef CONFIG_PM 66#ifdef CONFIG_PM
70unsigned long bfin_sic_iwr[3]; /* Up to 3 SIC_IWRx registers */ 67unsigned long bfin_sic_iwr[3]; /* Up to 3 SIC_IWRx registers */
71unsigned vr_wakeup; 68unsigned vr_wakeup;
72#endif 69#endif
73 70
74struct ivgx { 71static struct ivgx {
75 /* irq number for request_irq, available in mach-bf5xx/irq.h */ 72 /* irq number for request_irq, available in mach-bf5xx/irq.h */
76 unsigned int irqno; 73 unsigned int irqno;
77 /* corresponding bit in the SIC_ISR register */ 74 /* corresponding bit in the SIC_ISR register */
78 unsigned int isrflag; 75 unsigned int isrflag;
79} ivg_table[NR_PERI_INTS]; 76} ivg_table[NR_PERI_INTS];
80 77
81struct ivg_slice { 78static struct ivg_slice {
82 /* position of first irq in ivg_table for given ivg */ 79 /* position of first irq in ivg_table for given ivg */
83 struct ivgx *ifirst; 80 struct ivgx *ifirst;
84 struct ivgx *istop; 81 struct ivgx *istop;
@@ -1331,10 +1328,8 @@ void do_irq(int vec, struct pt_regs *fp)
1331 sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); 1328 sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2();
1332# endif 1329# endif
1333 for (;; ivg++) { 1330 for (;; ivg++) {
1334 if (ivg >= ivg_stop) { 1331 if (ivg >= ivg_stop)
1335 atomic_inc(&num_spurious);
1336 return; 1332 return;
1337 }
1338 if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag) 1333 if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag)
1339 break; 1334 break;
1340 } 1335 }
@@ -1344,10 +1339,9 @@ void do_irq(int vec, struct pt_regs *fp)
1344 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); 1339 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR();
1345 1340
1346 for (;; ivg++) { 1341 for (;; ivg++) {
1347 if (ivg >= ivg_stop) { 1342 if (ivg >= ivg_stop)
1348 atomic_inc(&num_spurious);
1349 return; 1343 return;
1350 } else if (sic_status & ivg->isrflag) 1344 if (sic_status & ivg->isrflag)
1351 break; 1345 break;
1352 } 1346 }
1353#endif 1347#endif
@@ -1403,10 +1397,8 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
1403 sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); 1397 sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2();
1404# endif 1398# endif
1405 for (;; ivg++) { 1399 for (;; ivg++) {
1406 if (ivg >= ivg_stop) { 1400 if (ivg >= ivg_stop)
1407 atomic_inc(&num_spurious);
1408 return 0; 1401 return 0;
1409 }
1410 if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag) 1402 if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag)
1411 break; 1403 break;
1412 } 1404 }
@@ -1416,10 +1408,9 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
1416 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); 1408 sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR();
1417 1409
1418 for (;; ivg++) { 1410 for (;; ivg++) {
1419 if (ivg >= ivg_stop) { 1411 if (ivg >= ivg_stop)
1420 atomic_inc(&num_spurious);
1421 return 0; 1412 return 0;
1422 } else if (sic_status & ivg->isrflag) 1413 if (sic_status & ivg->isrflag)
1423 break; 1414 break;
1424 } 1415 }
1425#endif 1416#endif