[PATCH] irq-flags: serial: Use the new IRQF_ constants

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Thomas Gleixner and committed by
Linus Torvalds
40663cc7 1d6f359a

+34 -34
+2 -2
drivers/serial/8250.c
··· 48 49 /* 50 * Configuration: 51 - * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option 52 * is unsafe when used on edge-triggered interrupts. 53 */ 54 static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; ··· 1400 static int serial_link_irq_chain(struct uart_8250_port *up) 1401 { 1402 struct irq_info *i = irq_lists + up->port.irq; 1403 - int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; 1404 1405 spin_lock_irq(&i->lock); 1406
··· 48 49 /* 50 * Configuration: 51 + * share_irqs - whether we pass IRQF_SHARED to request_irq(). This option 52 * is unsafe when used on edge-triggered interrupts. 53 */ 54 static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; ··· 1400 static int serial_link_irq_chain(struct uart_8250_port *up) 1401 { 1402 struct irq_info *i = irq_lists + up->port.irq; 1403 + int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; 1404 1405 spin_lock_irq(&i->lock); 1406
+1 -1
drivers/serial/at91_serial.c
··· 387 /* 388 * Allocate the IRQ 389 */ 390 - retval = request_irq(port->irq, at91_interrupt, SA_SHIRQ, "at91_serial", port); 391 if (retval) { 392 printk("at91_serial: at91_startup - Can't get irq\n"); 393 return retval;
··· 387 /* 388 * Allocate the IRQ 389 */ 390 + retval = request_irq(port->irq, at91_interrupt, IRQF_SHARED, "at91_serial", port); 391 if (retval) { 392 printk("at91_serial: at91_startup - Can't get irq\n"); 393 return retval;
+11 -11
drivers/serial/crisv10.c
··· 415 * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when 416 * closing the last filehandle, NASTY!. 417 * Added break generation, not tested though! 418 - * Use SA_SHIRQ when request_irq() for ser2 and ser3 (shared with) par0 and par1. 419 * You can't use them at the same time (yet..), but you can hopefully switch 420 * between ser2/par0, ser3/par1 with the same kernel config. 421 * Replaced some magic constants with defines ··· 4942 /* Not needed in simulator. May only complicate stuff. */ 4943 /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */ 4944 4945 - if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial ", NULL)) 4946 panic("irq8"); 4947 4948 #ifdef CONFIG_ETRAX_SERIAL_PORT0 4949 #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT 4950 - if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 0 dma tr", NULL)) 4951 panic("irq22"); 4952 #endif 4953 #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN 4954 - if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 0 dma rec", NULL)) 4955 panic("irq23"); 4956 #endif 4957 #endif 4958 4959 #ifdef CONFIG_ETRAX_SERIAL_PORT1 4960 #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT 4961 - if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 1 dma tr", NULL)) 4962 panic("irq24"); 4963 #endif 4964 #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN 4965 - if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 1 dma rec", NULL)) 4966 panic("irq25"); 4967 #endif 4968 #endif 4969 #ifdef CONFIG_ETRAX_SERIAL_PORT2 4970 /* DMA Shared with par0 (and SCSI0 and ATA) */ 4971 #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT 4972 - if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma tr", NULL)) 4973 panic("irq18"); 4974 #endif 4975 #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN 4976 - if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma rec", NULL)) 4977 panic("irq19"); 4978 #endif 4979 #endif 4980 #ifdef CONFIG_ETRAX_SERIAL_PORT3 4981 /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */ 4982 #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT 4983 - if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma tr", NULL)) 4984 panic("irq20"); 4985 #endif 4986 #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN 4987 - if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma rec", NULL)) 4988 panic("irq21"); 4989 #endif 4990 #endif 4991 4992 #ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST 4993 - if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, SA_SHIRQ | SA_INTERRUPT, 4994 "fast serial dma timeout", NULL)) { 4995 printk(KERN_CRIT "err: timer1 irq\n"); 4996 }
··· 415 * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when 416 * closing the last filehandle, NASTY!. 417 * Added break generation, not tested though! 418 + * Use IRQF_SHARED when request_irq() for ser2 and ser3 (shared with) par0 and par1. 419 * You can't use them at the same time (yet..), but you can hopefully switch 420 * between ser2/par0, ser3/par1 with the same kernel config. 421 * Replaced some magic constants with defines ··· 4942 /* Not needed in simulator. May only complicate stuff. */ 4943 /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */ 4944 4945 + if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial ", NULL)) 4946 panic("irq8"); 4947 4948 #ifdef CONFIG_ETRAX_SERIAL_PORT0 4949 #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT 4950 + if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 0 dma tr", NULL)) 4951 panic("irq22"); 4952 #endif 4953 #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN 4954 + if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 0 dma rec", NULL)) 4955 panic("irq23"); 4956 #endif 4957 #endif 4958 4959 #ifdef CONFIG_ETRAX_SERIAL_PORT1 4960 #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT 4961 + if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 1 dma tr", NULL)) 4962 panic("irq24"); 4963 #endif 4964 #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN 4965 + if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 1 dma rec", NULL)) 4966 panic("irq25"); 4967 #endif 4968 #endif 4969 #ifdef CONFIG_ETRAX_SERIAL_PORT2 4970 /* DMA Shared with par0 (and SCSI0 and ATA) */ 4971 #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT 4972 + if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma tr", NULL)) 4973 panic("irq18"); 4974 #endif 4975 #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN 4976 + if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma rec", NULL)) 4977 panic("irq19"); 4978 #endif 4979 #endif 4980 #ifdef CONFIG_ETRAX_SERIAL_PORT3 4981 /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */ 4982 #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT 4983 + if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma tr", NULL)) 4984 panic("irq20"); 4985 #endif 4986 #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN 4987 + if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma rec", NULL)) 4988 panic("irq21"); 4989 #endif 4990 #endif 4991 4992 #ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST 4993 + if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, IRQF_SHARED | IRQF_DISABLED, 4994 "fast serial dma timeout", NULL)) { 4995 printk(KERN_CRIT "err: timer1 irq\n"); 4996 }
+1 -1
drivers/serial/dz.c
··· 797 restore_flags(flags); 798 799 if (request_irq(dz_ports[0].port.irq, dz_interrupt, 800 - SA_INTERRUPT, "DZ", &dz_ports[0])) 801 panic("Unable to register DZ interrupt"); 802 803 ret = uart_register_driver(&dz_reg);
··· 797 restore_flags(flags); 798 799 if (request_irq(dz_ports[0].port.irq, dz_interrupt, 800 + IRQF_DISABLED, "DZ", &dz_ports[0])) 801 panic("Unable to register DZ interrupt"); 802 803 ret = uart_register_driver(&dz_reg);
+1 -1
drivers/serial/icom.c
··· 1563 1564 /* save off irq and request irq line */ 1565 if ( (retval = request_irq(dev->irq, icom_interrupt, 1566 - SA_INTERRUPT | SA_SHIRQ, ICOM_DRIVER_NAME, 1567 (void *) icom_adapter))) { 1568 goto probe_exit2; 1569 }
··· 1563 1564 /* save off irq and request irq line */ 1565 if ( (retval = request_irq(dev->irq, icom_interrupt, 1566 + IRQF_DISABLED | IRQF_SHARED, ICOM_DRIVER_NAME, 1567 (void *) icom_adapter))) { 1568 goto probe_exit2; 1569 }
+1 -1
drivers/serial/imx.c
··· 404 if (retval) goto error_out2; 405 406 retval = request_irq(sport->rtsirq, imx_rtsint, 407 - SA_TRIGGER_FALLING | SA_TRIGGER_RISING, 408 DRIVER_NAME, sport); 409 if (retval) goto error_out3; 410
··· 404 if (retval) goto error_out2; 405 406 retval = request_irq(sport->rtsirq, imx_rtsint, 407 + IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, 408 DRIVER_NAME, sport); 409 if (retval) goto error_out3; 410
+1 -1
drivers/serial/ioc4_serial.c
··· 2855 control->ic_soft = soft; 2856 2857 /* Hook up interrupt handler */ 2858 - if (!request_irq(idd->idd_pdev->irq, ioc4_intr, SA_SHIRQ, 2859 "sgi-ioc4serial", soft)) { 2860 control->ic_irq = idd->idd_pdev->irq; 2861 } else {
··· 2855 control->ic_soft = soft; 2856 2857 /* Hook up interrupt handler */ 2858 + if (!request_irq(idd->idd_pdev->irq, ioc4_intr, IRQF_SHARED, 2859 "sgi-ioc4serial", soft)) { 2860 control->ic_irq = idd->idd_pdev->irq; 2861 } else {
+1 -1
drivers/serial/jsm/jsm_driver.c
··· 121 } 122 123 rc = request_irq(brd->irq, brd->bd_ops->intr, 124 - SA_INTERRUPT|SA_SHIRQ, "JSM", brd); 125 if (rc) { 126 printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); 127 goto out_iounmap;
··· 121 } 122 123 rc = request_irq(brd->irq, brd->bd_ops->intr, 124 + IRQF_DISABLED|IRQF_SHARED, "JSM", brd); 125 if (rc) { 126 printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); 127 goto out_iounmap;
+1 -1
drivers/serial/m32r_sio.c
··· 542 static int serial_link_irq_chain(struct uart_sio_port *up) 543 { 544 struct irq_info *i = irq_lists + up->port.irq; 545 - int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; 546 547 spin_lock_irq(&i->lock); 548
··· 542 static int serial_link_irq_chain(struct uart_sio_port *up) 543 { 544 struct irq_info *i = irq_lists + up->port.irq; 545 + int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; 546 547 spin_lock_irq(&i->lock); 548
+1 -1
drivers/serial/mcfserial.c
··· 1596 /* Clear mask, so no surprise interrupts. */ 1597 uartp[MCFUART_UIMR] = 0; 1598 1599 - if (request_irq(info->irq, mcfrs_interrupt, SA_INTERRUPT, 1600 "ColdFire UART", NULL)) { 1601 printk("MCFRS: Unable to attach ColdFire UART %d interrupt " 1602 "vector=%d\n", info->line, info->irq);
··· 1596 /* Clear mask, so no surprise interrupts. */ 1597 uartp[MCFUART_UIMR] = 0; 1598 1599 + if (request_irq(info->irq, mcfrs_interrupt, IRQF_DISABLED, 1600 "ColdFire UART", NULL)) { 1601 printk("MCFRS: Unable to attach ColdFire UART %d interrupt " 1602 "vector=%d\n", info->line, info->irq);
+1 -1
drivers/serial/mpc52xx_uart.c
··· 190 191 /* Request IRQ */ 192 ret = request_irq(port->irq, mpc52xx_uart_int, 193 - SA_INTERRUPT | SA_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); 194 if (ret) 195 return ret; 196
··· 190 191 /* Request IRQ */ 192 ret = request_irq(port->irq, mpc52xx_uart_int, 193 + IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); 194 if (ret) 195 return ret; 196
+1 -1
drivers/serial/mpsc.c
··· 1412 1413 /* If irq's are shared, need to set flag */ 1414 if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq) 1415 - flag = SA_SHIRQ; 1416 1417 if (request_irq(pi->port.irq, mpsc_sdma_intr, flag, 1418 "mpsc-sdma", pi))
··· 1412 1413 /* If irq's are shared, need to set flag */ 1414 if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq) 1415 + flag = IRQF_SHARED; 1416 1417 if (request_irq(pi->port.irq, mpsc_sdma_intr, flag, 1418 "mpsc-sdma", pi))
+1 -1
drivers/serial/pmac_zilog.c
··· 934 } 935 936 pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON; 937 - if (request_irq(uap->port.irq, pmz_interrupt, SA_SHIRQ, "PowerMac Zilog", uap)) { 938 dev_err(&uap->dev->ofdev.dev, 939 "Unable to register zs interrupt handler.\n"); 940 pmz_set_scc_power(uap, 0);
··· 934 } 935 936 pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON; 937 + if (request_irq(uap->port.irq, pmz_interrupt, IRQF_SHARED, "PowerMac Zilog", uap)) { 938 dev_err(&uap->dev->ofdev.dev, 939 "Unable to register zs interrupt handler.\n"); 940 pmz_set_scc_power(uap, 0);
+1 -1
drivers/serial/serial_txx9.c
··· 495 sio_out(up, TXX9_SIDISR, 0); 496 497 retval = request_irq(up->port.irq, serial_txx9_interrupt, 498 - SA_SHIRQ, "serial_txx9", up); 499 if (retval) 500 return retval; 501
··· 495 sio_out(up, TXX9_SIDISR, 0); 496 497 retval = request_irq(up->port.irq, serial_txx9_interrupt, 498 + IRQF_SHARED, "serial_txx9", up); 499 if (retval) 500 return retval; 501
+2 -2
drivers/serial/sh-sci.c
··· 841 printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n"); 842 return -ENODEV; 843 } 844 - if (request_irq(port->irqs[0], sci_mpxed_interrupt, SA_INTERRUPT, 845 "sci", port)) { 846 printk(KERN_ERR "sci: Cannot allocate irq.\n"); 847 return -ENODEV; ··· 850 for (i = 0; i < ARRAY_SIZE(handlers); i++) { 851 if (!port->irqs[i]) 852 continue; 853 - if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT, 854 desc[i], port)) { 855 printk(KERN_ERR "sci: Cannot allocate irq.\n"); 856 return -ENODEV;
··· 841 printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n"); 842 return -ENODEV; 843 } 844 + if (request_irq(port->irqs[0], sci_mpxed_interrupt, IRQF_DISABLED, 845 "sci", port)) { 846 printk(KERN_ERR "sci: Cannot allocate irq.\n"); 847 return -ENODEV; ··· 850 for (i = 0; i < ARRAY_SIZE(handlers); i++) { 851 if (!port->irqs[i]) 852 continue; 853 + if (request_irq(port->irqs[i], handlers[i], IRQF_DISABLED, 854 desc[i], port)) { 855 printk(KERN_ERR "sci: Cannot allocate irq.\n"); 856 return -ENODEV;
+1 -1
drivers/serial/sn_console.c
··· 648 static int sn_sal_connect_interrupt(struct sn_cons_port *port) 649 { 650 if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, 651 - SA_INTERRUPT | SA_SHIRQ, 652 "SAL console driver", port) >= 0) { 653 return SGI_UART_VECTOR; 654 }
··· 648 static int sn_sal_connect_interrupt(struct sn_cons_port *port) 649 { 650 if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, 651 + IRQF_DISABLED | IRQF_SHARED, 652 "SAL console driver", port) >= 0) { 653 return SGI_UART_VECTOR; 654 }
+1 -1
drivers/serial/sunsab.c
··· 1027 int err; 1028 1029 err = request_irq(up->port.irq, sunsab_interrupt, 1030 - SA_SHIRQ, "sab", up); 1031 if (err) { 1032 of_iounmap(up->port.membase, 1033 sizeof(union sab82532_async_regs));
··· 1027 int err; 1028 1029 err = request_irq(up->port.irq, sunsab_interrupt, 1030 + IRQF_SHARED, "sab", up); 1031 if (err) { 1032 of_iounmap(up->port.membase, 1033 sizeof(union sab82532_async_regs));
+2 -2
drivers/serial/sunsu.c
··· 667 668 if (up->su_type != SU_PORT_PORT) { 669 retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, 670 - SA_SHIRQ, su_typev[up->su_type], up); 671 } else { 672 retval = request_irq(up->port.irq, sunsu_serial_interrupt, 673 - SA_SHIRQ, su_typev[up->su_type], up); 674 } 675 if (retval) { 676 printk("su: Cannot register IRQ %d\n", up->port.irq);
··· 667 668 if (up->su_type != SU_PORT_PORT) { 669 retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, 670 + IRQF_SHARED, su_typev[up->su_type], up); 671 } else { 672 retval = request_irq(up->port.irq, sunsu_serial_interrupt, 673 + IRQF_SHARED, su_typev[up->su_type], up); 674 } 675 if (retval) { 676 printk("su: Cannot register IRQ %d\n", up->port.irq);
+1 -1
drivers/serial/sunzilog.c
··· 1354 1355 if (zilog_irq == -1) { 1356 zilog_irq = op->irqs[0]; 1357 - err = request_irq(zilog_irq, sunzilog_interrupt, SA_SHIRQ, 1358 "zs", sunzilog_irq_chain); 1359 if (err) { 1360 of_iounmap(rp, sizeof(struct zilog_layout));
··· 1354 1355 if (zilog_irq == -1) { 1356 zilog_irq = op->irqs[0]; 1357 + err = request_irq(zilog_irq, sunzilog_interrupt, IRQF_SHARED, 1358 "zs", sunzilog_irq_chain); 1359 if (err) { 1360 of_iounmap(rp, sizeof(struct zilog_layout));
+2 -2
drivers/serial/v850e_uart.c
··· 372 373 /* Alloc RX irq. */ 374 err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq, 375 - SA_INTERRUPT, "v850e_uart", port); 376 if (err) 377 return err; 378 379 /* Alloc TX irq. */ 380 err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq, 381 - SA_INTERRUPT, "v850e_uart", port); 382 if (err) { 383 free_irq (V850E_UART_RX_IRQ (port->line), port); 384 return err;
··· 372 373 /* Alloc RX irq. */ 374 err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq, 375 + IRQF_DISABLED, "v850e_uart", port); 376 if (err) 377 return err; 378 379 /* Alloc TX irq. */ 380 err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq, 381 + IRQF_DISABLED, "v850e_uart", port); 382 if (err) { 383 free_irq (V850E_UART_RX_IRQ (port->line), port); 384 return err;