m68k: Atari SCC support for ST
Subsystems (9)
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: Atari SCC support for ST
Enable support for Atari ST, and fix 2 obvious typos in the ST support code.
--- drivers/char/atari_scc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/char/atari_scc.c +3 -2
@@ -51,6 +51,7 @@#define CONFIG_TT_SCC 1#define CONFIG_FALCON_SCC 1 +#define CONFIG_ST_SCC 1#define CHANNEL_A 0#define CHANNEL_B 1
@@ -475,7 +476,7 @@ static int atari_st_scc_init(void)request_irq (IRQ_SCCA_STAT , scc_stat_int,IRQ_TYPE_PRIO ,"SCC-A status" , port);request_irq (IRQ_SCCA_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-A RX" , port); -request_irq (SCCA_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , +request_irq (IRQ_SCCA_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO ,"SCC-A special cond" , port); {SCC_ACCESS_INIT (port);
@@ -493,7 +494,7 @@ static int atari_st_scc_init(void)/* disable interrupts for this channel */ SCCwrite (INT_AND_DMA_REG ,0 );/* Set the interrupt vector */ -SCCwrite (INT_VECTOR_REG ,BVME_IRQ_SCC_BASE ); +SCCwrite (INT_VECTOR_REG ,0x60 );/* Interrupt parameters: vector includes status, status low */ SCCwrite (MASTER_INT_CTRL ,MIC_VEC_INCL_STAT );SCCmod (MASTER_INT_CTRL ,0xff ,MIC_MASTER_INT_ENAB );
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: amiga core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/amiga/amiints.c | 12 ++++++++---- arch/m68k/amiga/cia.c | 4 +++- arch/m68k/amiga/config.c | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-)
arch/m68k/amiga/amiints.c +8 -4
@@ -72,10 +72,14 @@ static struct irq_controller amiga_irq_controller = {void __init amiga_init_IRQ (void ) { -request_irq (IRQ_AUTO_1 , ami_int1,0 ,"int1" ,NULL ); -request_irq (IRQ_AUTO_3 , ami_int3,0 ,"int3" ,NULL ); -request_irq (IRQ_AUTO_4 , ami_int4,0 ,"int4" ,NULL ); -request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL ); +if (request_irq (IRQ_AUTO_1 , ami_int1,0 ,"int1" ,NULL )) +pr_err ("Couldn't register int%d\n" ,1 ); +if (request_irq (IRQ_AUTO_3 , ami_int3,0 ,"int3" ,NULL )) +pr_err ("Couldn't register int%d\n" ,3 ); +if (request_irq (IRQ_AUTO_4 , ami_int4,0 ,"int4" ,NULL )) +pr_err ("Couldn't register int%d\n" ,4 ); +if (request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL )) +pr_err ("Couldn't register int%d\n" ,5 );m68k_setup_irq_controller (&amiga_irq_controller,IRQ_USER ,AMI_STD_IRQS );
arch/m68k/amiga/cia.c +3 -1
@@ -176,5 +176,7 @@ void __init cia_init_IRQ(struct ciabase *base)/* override auto int and install CIA handler */ m68k_setup_irq_controller (&auto_irq_controller, base->handler_irq,1 );m68k_irq_startup (base->handler_irq); -request_irq (base->handler_irq, cia_handler,IRQF_SHARED , base->name, base); +if (request_irq (base->handler_irq, cia_handler,IRQF_SHARED , + base->name, base)) +pr_err ("Couldn't register %s interrupt\n" , base->name); }
arch/m68k/amiga/config.c +2 -1
@@ -499,7 +499,8 @@ static void __init amiga_sched_init(irq_handler_t timer_routine)* Please don't change this to use ciaa, as it interferes with the * SCSI code. We'll have to take a look at this later */ -request_irq (IRQ_AMIGA_CIAB_TA , timer_routine,0 ,"timer" ,NULL ); +if (request_irq (IRQ_AMIGA_CIAB_TA , timer_routine,0 ,"timer" ,NULL )) +pr_err ("Couldn't register timer interrupt\n" );/* start timer */ ciab.cra |=0x11 ; }
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: apollo core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/apollo/config.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/m68k/apollo/config.c +2 -1
@@ -200,7 +200,8 @@ void dn_sched_init(irq_handler_t timer_routine)printk ("*(0x10803) %02x\n" ,*(volatile unsigned char *)(timer+0x3 ));#endif -request_irq (IRQ_APOLLO , dn_timer_int,0 ,"time" , timer_routine); +if (request_irq (IRQ_APOLLO , dn_timer_int,0 ,"time" , timer_routine)) +pr_err ("Couldn't register timer interrupt\n" ); }unsigned long dn_gettimeoffset (void ) {
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: atari core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/atari/atakeyb.c | 9 +++++++-- arch/m68k/atari/stdma.c | 5 +++-- arch/m68k/atari/time.c | 5 +++-- 3 files changed, 13 insertions(+), 6 deletions(-)
arch/m68k/atari/atakeyb.c +7 -2
@@ -563,14 +563,19 @@ static int atari_keyb_done = 0;int atari_keyb_init (void ) { +int error; +if (atari_keyb_done)return 0 ; kb_state.state =KEYBOARD ; kb_state.len =0 ; -request_irq (IRQ_MFP_ACIA , atari_keyboard_interrupt,IRQ_TYPE_SLOW , -"keyboard/mouse/MIDI" , atari_keyboard_interrupt); + error =request_irq (IRQ_MFP_ACIA , atari_keyboard_interrupt, +IRQ_TYPE_SLOW ,"keyboard/mouse/MIDI" , + atari_keyboard_interrupt); +if (error) +return error;atari_turnoff_irq (IRQ_MFP_ACIA ); do {
arch/m68k/atari/stdma.c +3 -2
@@ -179,8 +179,9 @@ EXPORT_SYMBOL(stdma_islocked);void __init stdma_init (void ) { stdma_isr =NULL ; -request_irq (IRQ_MFP_FDC , stdma_int,IRQ_TYPE_SLOW |IRQF_SHARED , -"ST-DMA: floppy/ACSI/IDE/Falcon-SCSI" , stdma_int); +if (request_irq (IRQ_MFP_FDC , stdma_int,IRQ_TYPE_SLOW |IRQF_SHARED , +"ST-DMA: floppy/ACSI/IDE/Falcon-SCSI" , stdma_int)) +pr_err ("Couldn't register ST-DMA interrupt\n" ); }
arch/m68k/atari/time.c +3 -2
@@ -31,8 +31,9 @@ atari_sched_init(irq_handler_t timer_routine)/* start timer C, div = 1:100 */ mfp.tim_ct_cd = (mfp.tim_ct_cd &15 ) |0x60 ;/* install interrupt service routine for MFP Timer C */ -request_irq (IRQ_MFP_TIMC , timer_routine,IRQ_TYPE_SLOW , -"timer" , timer_routine); +if (request_irq (IRQ_MFP_TIMC , timer_routine,IRQ_TYPE_SLOW , +"timer" , timer_routine)) +pr_err ("Couldn't register timer interrupt\n" ); }/* ++andreas: gettimeoffset fixed to check for pending interrupt */
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: hp300 core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/hp300/time.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/m68k/hp300/time.c +2 -1
@@ -70,7 +70,8 @@ void __init hp300_sched_init(irq_handler_t vector) asmvolatile (" movpw %0,%1@(5)" : :"d" (INTVAL ),"a" (CLOCKBASE )); -request_irq (IRQ_AUTO_6 , hp300_tick,IRQ_FLG_STD ,"timer tick" , vector); +if (request_irq (IRQ_AUTO_6 , hp300_tick,IRQ_FLG_STD ,"timer tick" , vector)) +pr_err ("Couldn't register timer interrupt\n" );out_8 (CLOCKBASE +CLKCR2 ,0x1 );/* select CR1 */ out_8 (CLOCKBASE +CLKCR1 ,0x40 );/* enable irq */
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: mac core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/mac/baboon.c | 3 ++- arch/m68k/mac/iop.c | 10 ++++++---- arch/m68k/mac/macints.c | 5 +++-- arch/m68k/mac/oss.c | 25 +++++++++++++++---------- arch/m68k/mac/psc.c | 12 ++++++++---- arch/m68k/mac/via.c | 33 ++++++++++++++++++++------------- 6 files changed, 54 insertions(+), 34 deletions(-)
arch/m68k/mac/baboon.c +2 -1
@@ -92,7 +92,8 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)void __init baboon_register_interrupts (void ) { baboon_disabled =0 ; -request_irq (IRQ_NUBUS_C , baboon_irq,0 ,"baboon" , (void *)baboon); +if (request_irq (IRQ_NUBUS_C , baboon_irq,0 ,"baboon" , (void *)baboon)) +pr_err ("Couldn't register baboon interrupt\n" ); }/*
arch/m68k/mac/iop.c +6 -4
@@ -305,14 +305,16 @@ void __init iop_register_interrupts(void) {if (iop_ism_present) {if (oss_present) { -request_irq (OSS_IRQLEV_IOPISM , iop_ism_irq, +if (request_irq (OSS_IRQLEV_IOPISM , iop_ism_irq,IRQ_FLG_LOCK ,"ISM IOP" , - (void *)IOP_NUM_ISM ); + (void *)IOP_NUM_ISM )) +pr_err ("Couldn't register ISM IOP interrupt\n" );oss_irq_enable (IRQ_MAC_ADB ); }else { -request_irq (IRQ_VIA2_0 , iop_ism_irq, +if (request_irq (IRQ_VIA2_0 , iop_ism_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST ,"ISM IOP" , - (void *)IOP_NUM_ISM ); + (void *)IOP_NUM_ISM )) +pr_err ("Couldn't register ISM IOP interrupt\n" ); }if (!iop_alive (iop_base[IOP_NUM_ISM ])) {printk ("IOP: oh my god, they killed the ISM IOP!\n" );
arch/m68k/mac/macints.c +3 -2
@@ -250,8 +250,9 @@ void __init mac_init_IRQ(void)if (baboon_present)baboon_register_interrupts ();iop_register_interrupts (); -request_irq (IRQ_AUTO_7 , mac_nmi_handler,0 ,"NMI" , - mac_nmi_handler); +if (request_irq (IRQ_AUTO_7 , mac_nmi_handler,0 ,"NMI" , + mac_nmi_handler)) +pr_err ("Couldn't register NMI\n" );#ifdef DEBUG_MACINTS printk ("mac_init_IRQ(): Done!\n" );#endif
arch/m68k/mac/oss.c +15 -10
@@ -66,16 +66,21 @@ void __init oss_init(void)void __init oss_register_interrupts (void ) { -request_irq (OSS_IRQLEV_SCSI , oss_irq,IRQ_FLG_LOCK , -"scsi" , (void *) oss); -request_irq (OSS_IRQLEV_IOPSCC , mac_scc_dispatch,IRQ_FLG_LOCK , -"scc" , mac_scc_dispatch); -request_irq (OSS_IRQLEV_NUBUS , oss_nubus_irq,IRQ_FLG_LOCK , -"nubus" , (void *) oss); -request_irq (OSS_IRQLEV_SOUND , oss_irq,IRQ_FLG_LOCK , -"sound" , (void *) oss); -request_irq (OSS_IRQLEV_VIA1 , via1_irq,IRQ_FLG_LOCK , -"via1" , (void *) via1); +if (request_irq (OSS_IRQLEV_SCSI , oss_irq,IRQ_FLG_LOCK , +"scsi" , (void *) oss)) +pr_err ("Couldn't register %s interrupt\n" ,"scsi" ); +if (request_irq (OSS_IRQLEV_IOPSCC , mac_scc_dispatch,IRQ_FLG_LOCK , +"scc" , mac_scc_dispatch)) +pr_err ("Couldn't register %s interrupt\n" ,"scc" ); +if (request_irq (OSS_IRQLEV_NUBUS , oss_nubus_irq,IRQ_FLG_LOCK , +"nubus" , (void *) oss)) +pr_err ("Couldn't register %s interrupt\n" ,"nubus" ); +if (request_irq (OSS_IRQLEV_SOUND , oss_irq,IRQ_FLG_LOCK , +"sound" , (void *) oss)) +pr_err ("Couldn't register %s interrupt\n" ,"sound" ); +if (request_irq (OSS_IRQLEV_VIA1 , via1_irq,IRQ_FLG_LOCK , +"via1" , (void *) via1)) +pr_err ("Couldn't register %s interrupt\n" ,"via1" ); }/*
arch/m68k/mac/psc.c +8 -4
@@ -117,10 +117,14 @@ void __init psc_init(void)void __init psc_register_interrupts (void ) { -request_irq (IRQ_AUTO_3 , psc_irq,0 ,"psc3" , (void *)0x30 ); -request_irq (IRQ_AUTO_4 , psc_irq,0 ,"psc4" , (void *)0x40 ); -request_irq (IRQ_AUTO_5 , psc_irq,0 ,"psc5" , (void *)0x50 ); -request_irq (IRQ_AUTO_6 , psc_irq,0 ,"psc6" , (void *)0x60 ); +if (request_irq (IRQ_AUTO_3 , psc_irq,0 ,"psc3" , (void *)0x30 )) +pr_err ("Couldn't register psc%d interrupt\n" ,3 ); +if (request_irq (IRQ_AUTO_4 , psc_irq,0 ,"psc4" , (void *)0x40 )) +pr_err ("Couldn't register psc%d interrupt\n" ,4 ); +if (request_irq (IRQ_AUTO_5 , psc_irq,0 ,"psc5" , (void *)0x50 )) +pr_err ("Couldn't register psc%d interrupt\n" ,5 ); +if (request_irq (IRQ_AUTO_6 , psc_irq,0 ,"psc6" , (void *)0x60 )) +pr_err ("Couldn't register psc%d interrupt\n" ,6 ); }/*
arch/m68k/mac/via.c +20 -13
@@ -283,7 +283,8 @@ void __init via_init_clock(irq_handler_t func) via1[vT1CL] =MAC_CLOCK_LOW ; via1[vT1CH] =MAC_CLOCK_HIGH ; -request_irq (IRQ_MAC_TIMER_1 , func,IRQ_FLG_LOCK ,"timer" , func); +if (request_irq (IRQ_MAC_TIMER_1 , func,IRQ_FLG_LOCK ,"timer" , func)) +pr_err ("Couldn't register %s interrupt\n" ,"timer" ); }/*
@@ -293,25 +294,31 @@ void __init via_init_clock(irq_handler_t func)void __init via_register_interrupts (void ) {if (via_alt_mapping) { -request_irq (IRQ_AUTO_1 , via1_irq, +if (request_irq (IRQ_AUTO_1 , via1_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST ,"software" , - (void *) via1); -request_irq (IRQ_AUTO_6 , via1_irq, + (void *) via1)) +pr_err ("Couldn't register %s interrupt\n" ,"software" ); +if (request_irq (IRQ_AUTO_6 , via1_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST ,"via1" , - (void *) via1); + (void *) via1)) +pr_err ("Couldn't register %s interrupt\n" ,"via1" ); }else { -request_irq (IRQ_AUTO_1 , via1_irq, +if (request_irq (IRQ_AUTO_1 , via1_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST ,"via1" , - (void *) via1); + (void *) via1)) +pr_err ("Couldn't register %s interrupt\n" ,"via1" ); } -request_irq (IRQ_AUTO_2 , via2_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST , -"via2" , (void *) via2); +if (request_irq (IRQ_AUTO_2 , via2_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST , +"via2" , (void *) via2)) +pr_err ("Couldn't register %s interrupt\n" ,"via2" );if (!psc_present) { -request_irq (IRQ_AUTO_4 , mac_scc_dispatch,IRQ_FLG_LOCK , -"scc" , mac_scc_dispatch); +if (request_irq (IRQ_AUTO_4 , mac_scc_dispatch,IRQ_FLG_LOCK , +"scc" , mac_scc_dispatch)) +pr_err ("Couldn't register %s interrupt\n" ,"scc" ); } -request_irq (IRQ_MAC_NUBUS , via_nubus_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST , -"nubus" , (void *) via2); +if (request_irq (IRQ_MAC_NUBUS , via_nubus_irq, +IRQ_FLG_LOCK |IRQ_FLG_FAST ,"nubus" , (void *) via2)) +pr_err ("Couldn't register %s interrupt\n" ,"nubus" ); }/*
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: mvme147 core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/mvme147/config.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
arch/m68k/mvme147/config.c +3 -2
@@ -114,8 +114,9 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id)void mvme147_sched_init (irq_handler_t timer_routine) { tick_handler = timer_routine; -request_irq (PCC_IRQ_TIMER1 , mvme147_timer_int, -IRQ_FLG_REPLACE ,"timer 1" ,NULL ); +if (request_irq (PCC_IRQ_TIMER1 , mvme147_timer_int,IRQ_FLG_REPLACE , +"timer 1" ,NULL )) +pr_err ("Couldn't register timer interrupt\n" );/* Init the clock with a value */ /* our clock goes off every 6.25us */
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: sun3 core - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- arch/m68k/sun3/sun3ints.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
arch/m68k/sun3/sun3ints.c +6 -3
@@ -105,7 +105,10 @@ void __init sun3_init_IRQ(void)m68k_setup_irq_controller (&sun3_irq_controller,IRQ_AUTO_1 ,7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL ); -request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ); -request_irq (IRQ_AUTO_7 , sun3_int7,0 ,"int7" ,NULL ); -request_irq (IRQ_USER +127 , sun3_vec255,0 ,"vec255" ,NULL ); +if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL )) +pr_err ("Couldn't register %s interrupt\n" ,"int5" ); +if (request_irq (IRQ_AUTO_7 , sun3_int7,0 ,"int7" ,NULL )) +pr_err ("Couldn't register %s interrupt\n" ,"int7" ); +if (request_irq (IRQ_USER +127 , sun3_vec255,0 ,"vec255" ,NULL )) +pr_err ("Couldn't register %s interrupt\n" ,"vec255" ); }
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: atari_scc - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- drivers/char/atari_scc.c | 177 +++++++++++++++++++++++++++++++++------------- 1 files changed, 128 insertions(+), 49 deletions(-)
drivers/char/atari_scc.c +128 -49
@@ -276,10 +276,99 @@ static void scc_init_portstructs(void) } +static int atari_scc_a_request_irqs (struct scc_port *port) +{ +int error; + + error =request_irq (IRQ_SCCA_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-A TX" , + port); +if (error) + goto fail; + + error =request_irq (IRQ_SCCA_STAT , scc_stat_int,IRQ_TYPE_PRIO , +"SCC-A status" , port); +if (error) + goto fail_free_a_tx; + + error =request_irq (IRQ_SCCA_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-A RX" , + port); +if (error) + goto fail_free_a_stat; + + error =request_irq (IRQ_SCCA_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , +"SCC-A special cond" , port); +if (error) + goto fail_free_a_rx; + +return 0 ; + +fail_free_a_rx: +free_irq (IRQ_SCCA_RX , port); +fail_free_a_stat: +free_irq (IRQ_SCCA_STAT , port); +fail_free_a_tx: +free_irq (IRQ_SCCA_TX , port); +fail: +return error; +} + +static void atari_scc_a_free_irqs (struct scc_port *port) +{ +free_irq (IRQ_SCCA_TX , port); +free_irq (IRQ_SCCA_STAT , port); +free_irq (IRQ_SCCA_RX , port); +free_irq (IRQ_SCCA_SPCOND , port); +} + +static int atari_scc_b_request_irqs (struct scc_port *port) +{ +int error; + + error =request_irq (IRQ_SCCB_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-B TX" , + port); +if (error) + goto fail; + + error =request_irq (IRQ_SCCB_STAT , scc_stat_int,IRQ_TYPE_PRIO , +"SCC-B status" , port); +if (error) + goto fail_free_b_tx; + + error =request_irq (IRQ_SCCB_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-B RX" , + port); +if (error) + goto fail_free_b_stat; + + error =request_irq (IRQ_SCCB_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , +"SCC-B special cond" , port); +if (error) + goto fail_free_b_rx; + +return 0 ; + +fail_free_b_rx: +free_irq (IRQ_SCCB_RX , port); +fail_free_b_stat: +free_irq (IRQ_SCCB_STAT , port); +fail_free_b_tx: +free_irq (IRQ_SCCB_TX , port); +fail: +return error; +} + +static void atari_scc_b_free_irqs (struct scc_port *port) +{ +free_irq (IRQ_SCCB_TX , port); +free_irq (IRQ_SCCB_STAT , port); +free_irq (IRQ_SCCB_RX , port); +free_irq (IRQ_SCCB_SPCOND , port); +} +#ifdef CONFIG_TT_SCC static int atari_tt_scc_init (void ) {struct scc_port *port; +int error;pr_info ("SCC: Atari TT Serial Driver\n" );/* FIXME channel A may be switchable between modem and LAN port */
@@ -294,12 +383,10 @@ static int atari_tt_scc_init(void) port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ];pr_debug ("SCC: request channel A irqs, port = %p\n" , port); -request_irq (IRQ_SCCA_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-A TX" , port); -request_irq (IRQ_SCCA_STAT , scc_stat_int,IRQ_TYPE_PRIO , -"SCC-A status" , port); -request_irq (IRQ_SCCA_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-A RX" , port); -request_irq (IRQ_SCCA_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , -"SCC-A special cond" , port); + error =atari_scc_a_request_irqs (port); +if (error) +return error; + {SCC_ACCESS_INIT (port);pr_debug ("SCC: read SCC status\n" );
@@ -335,14 +422,12 @@ static int atari_tt_scc_init(void) port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ];pr_debug ("SCC: request channel B irqs, port = %p\n" , port); -request_irq (IRQ_SCCB_TX , scc_tx_int,IRQ_TYPE_PRIO , -"SCC-B TX" , port); -request_irq (IRQ_SCCB_STAT , scc_stat_int,IRQ_TYPE_PRIO , -"SCC-B status" , port); -request_irq (IRQ_SCCB_RX , scc_rx_int,IRQ_TYPE_PRIO , -"SCC-B RX" , port); -request_irq (IRQ_SCCB_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , -"SCC-B special cond" , port); + error =atari_scc_b_request_irqs (port); +if (error) { +atari_scc_a_free_irqs (port); +return error; + } + {SCC_ACCESS_INIT (port);
@@ -351,8 +436,13 @@ static int atari_tt_scc_init(void) }/* not implemented yet */ #if 0 -request_irq (IRQ_TT_MFP_RI , scc_ri_int,IRQ_TYPE_SLOW , -"TT-MFP ring indicator (modem 2)" , port); + error =request_irq (IRQ_TT_MFP_RI , scc_ri_int,IRQ_TYPE_SLOW , +"TT-MFP ring indicator (modem 2)" , port); +if (error) { +atari_scc_b_free_irqs (port); +atari_scc_a_free_irqs (port); +return error; + }#endif }
@@ -381,6 +471,7 @@ static int atari_tt_scc_init(void)static int atari_falcon_scc_init (void ) {struct scc_port *port; +int error;pr_info ("SCC: Atari Falcon Serial Driver\n" );if (atari_SCC_init_done)
@@ -393,12 +484,10 @@ static int atari_falcon_scc_init(void) port->datap = port->ctrlp +2 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (IRQ_SCCA_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-A TX" , port); -request_irq (IRQ_SCCA_STAT , scc_stat_int,IRQ_TYPE_PRIO , -"SCC-A status" , port); -request_irq (IRQ_SCCA_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-A RX" , port); -request_irq (IRQ_SCCA_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , -"SCC-A special cond" , port); + error =atari_scc_a_request_irqs (port); +if (error) +return error; + {SCC_ACCESS_INIT (port);
@@ -429,12 +518,11 @@ static int atari_falcon_scc_init(void) port->datap = port->ctrlp +2 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (IRQ_SCCB_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-B TX" , port); -request_irq (IRQ_SCCB_STAT , scc_stat_int,IRQ_TYPE_PRIO , -"SCC-B status" , port); -request_irq (IRQ_SCCB_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-B RX" , port); -request_irq (IRQ_SCCB_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , -"SCC-B special cond" , port); + error =atari_scc_b_request_irqs (port); +if (error) { +atari_scc_a_free_irqs (port); +return error; + } {SCC_ACCESS_INIT (port);/* Either channel will do */
@@ -461,6 +549,7 @@ static int atari_st_scc_init(void) {struct scc_port *port;int escc =ATARIHW_PRESENT (ST_ESCC ); +int error;pr_info ("SCC: Atari MegaST/E Serial Driver\n" );/* FIXME: ports reversed logic */
@@ -472,12 +561,10 @@ static int atari_st_scc_init(void) port->datap = port->ctrlp +4 ; port->port_a = &scc_ports[1 ]; port->port_b = &scc_ports[0 ]; -request_irq (IRQ_SCCA_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-A TX" , port); -request_irq (IRQ_SCCA_STAT , scc_stat_int,IRQ_TYPE_PRIO , -"SCC-A status" , port); -request_irq (IRQ_SCCA_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-A RX" , port); -request_irq (IRQ_SCCA_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , -"SCC-A special cond" , port); + error =atari_scc_a_request_irqs (port); +if (error) +return error; + {SCC_ACCESS_INIT (port);
@@ -508,12 +595,11 @@ static int atari_st_scc_init(void) port->datap = port->ctrlp +4 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (IRQ_SCCB_TX , scc_tx_int,IRQ_TYPE_PRIO ,"SCC-B TX" , port); -request_irq (IRQ_SCCB_STAT , scc_stat_int,IRQ_TYPE_PRIO , -"SCC-B status" , port); -request_irq (IRQ_SCCB_RX , scc_rx_int,IRQ_TYPE_PRIO ,"SCC-B RX" , port); -request_irq (IRQ_SCCB_SPCOND , scc_spcond_int,IRQ_TYPE_PRIO , -"SCC-B special cond" , port); + error =atari_scc_b_request_irqs (port); +if (error) { +atari_scc_a_free_irqs (port); +return error; + } {SCC_ACCESS_INIT (port);/* Either channel will do */
@@ -571,18 +657,11 @@ void atari_scc_cleanup(void)tty_unregister_driver (scc_driver); port = &scc_ports[0 ];pr_debug ("SCC: free channel A irqs, port = %p\n" , port); -free_irq (IRQ_SCCA_TX , port); -free_irq (IRQ_SCCA_STAT , port); -free_irq (IRQ_SCCA_RX , port); -free_irq (IRQ_SCCA_SPCOND , port); +atari_scc_a_free_irqs (port); port = &scc_ports[1 ];pr_debug ("SCC: free channel A irqs, port = %p\n" , port); -free_irq (IRQ_SCCB_TX , port); -free_irq (IRQ_SCCB_STAT , port); -free_irq (IRQ_SCCB_RX , port); -free_irq (IRQ_SCCB_SPCOND , port); - +atari_scc_b_free_irqs (port); }module_init (atari_scc_init);
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: vme_scc - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- drivers/char/vme_scc.c | 166 +++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 136 insertions(+), 30 deletions(-)
drivers/char/vme_scc.c +136 -30
@@ -193,6 +193,7 @@ static void scc_init_portstructs(void)static int mvme147_scc_init (void ) {struct scc_port *port; +int error;printk (KERN_INFO "SCC: MVME147 Serial Driver\n" );/* Init channel A */
@@ -202,14 +203,23 @@ static int mvme147_scc_init(void) port->datap = port->ctrlp +1 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (MVME147_IRQ_SCCA_TX , scc_tx_int,IRQF_DISABLED , + error =request_irq (MVME147_IRQ_SCCA_TX , scc_tx_int,IRQF_DISABLED ,"SCC-A TX" , port); -request_irq (MVME147_IRQ_SCCA_STAT , scc_stat_int,IRQF_DISABLED , +if (error) + goto fail; + error =request_irq (MVME147_IRQ_SCCA_STAT , scc_stat_int,IRQF_DISABLED ,"SCC-A status" , port); -request_irq (MVME147_IRQ_SCCA_RX , scc_rx_int,IRQF_DISABLED , +if (error) + goto fail_free_a_tx; + error =request_irq (MVME147_IRQ_SCCA_RX , scc_rx_int,IRQF_DISABLED ,"SCC-A RX" , port); -request_irq (MVME147_IRQ_SCCA_SPCOND , scc_spcond_int,IRQF_DISABLED , -"SCC-A special cond" , port); +if (error) + goto fail_free_a_stat; + error =request_irq (MVME147_IRQ_SCCA_SPCOND , scc_spcond_int, +IRQF_DISABLED ,"SCC-A special cond" , port); +if (error) + goto fail_free_a_rx; + {SCC_ACCESS_INIT (port);
@@ -229,14 +239,23 @@ static int mvme147_scc_init(void) port->datap = port->ctrlp +1 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (MVME147_IRQ_SCCB_TX , scc_tx_int,IRQF_DISABLED , + error =request_irq (MVME147_IRQ_SCCB_TX , scc_tx_int,IRQF_DISABLED ,"SCC-B TX" , port); -request_irq (MVME147_IRQ_SCCB_STAT , scc_stat_int,IRQF_DISABLED , +if (error) + goto fail_free_a_spcond; + error =request_irq (MVME147_IRQ_SCCB_STAT , scc_stat_int,IRQF_DISABLED ,"SCC-B status" , port); -request_irq (MVME147_IRQ_SCCB_RX , scc_rx_int,IRQF_DISABLED , +if (error) + goto fail_free_b_tx; + error =request_irq (MVME147_IRQ_SCCB_RX , scc_rx_int,IRQF_DISABLED ,"SCC-B RX" , port); -request_irq (MVME147_IRQ_SCCB_SPCOND , scc_spcond_int,IRQF_DISABLED , -"SCC-B special cond" , port); +if (error) + goto fail_free_b_stat; + error =request_irq (MVME147_IRQ_SCCB_SPCOND , scc_spcond_int, +IRQF_DISABLED ,"SCC-B special cond" , port); +if (error) + goto fail_free_b_rx; + {SCC_ACCESS_INIT (port);
@@ -252,6 +271,23 @@ static int mvme147_scc_init(void)scc_init_drivers ();return 0 ; + +fail_free_b_rx: +free_irq (MVME147_IRQ_SCCB_RX , port); +fail_free_b_stat: +free_irq (MVME147_IRQ_SCCB_STAT , port); +fail_free_b_tx: +free_irq (MVME147_IRQ_SCCB_TX , port); +fail_free_a_spcond: +free_irq (MVME147_IRQ_SCCA_SPCOND , port); +fail_free_a_rx: +free_irq (MVME147_IRQ_SCCA_RX , port); +fail_free_a_stat: +free_irq (MVME147_IRQ_SCCA_STAT , port); +fail_free_a_tx: +free_irq (MVME147_IRQ_SCCA_TX , port); +fail: + return error; }#endif
@@ -260,6 +296,7 @@ static int mvme147_scc_init(void)static int mvme162_scc_init (void ) {struct scc_port *port; +int error;if (!(mvme16x_config & MVME16x_CONFIG_GOT_SCCA))return (-ENODEV );
@@ -272,14 +309,23 @@ static int mvme162_scc_init(void) port->datap = port->ctrlp +2 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (MVME162_IRQ_SCCA_TX , scc_tx_int,IRQF_DISABLED , + error =request_irq (MVME162_IRQ_SCCA_TX , scc_tx_int,IRQF_DISABLED ,"SCC-A TX" , port); -request_irq (MVME162_IRQ_SCCA_STAT , scc_stat_int,IRQF_DISABLED , +if (error) + goto fail; + error =request_irq (MVME162_IRQ_SCCA_STAT , scc_stat_int,IRQF_DISABLED ,"SCC-A status" , port); -request_irq (MVME162_IRQ_SCCA_RX , scc_rx_int,IRQF_DISABLED , +if (error) + goto fail_free_a_tx; + error =request_irq (MVME162_IRQ_SCCA_RX , scc_rx_int,IRQF_DISABLED ,"SCC-A RX" , port); -request_irq (MVME162_IRQ_SCCA_SPCOND , scc_spcond_int,IRQF_DISABLED , -"SCC-A special cond" , port); +if (error) + goto fail_free_a_stat; + error =request_irq (MVME162_IRQ_SCCA_SPCOND , scc_spcond_int, +IRQF_DISABLED ,"SCC-A special cond" , port); +if (error) + goto fail_free_a_rx; + {SCC_ACCESS_INIT (port);
@@ -299,14 +345,22 @@ static int mvme162_scc_init(void) port->datap = port->ctrlp +2 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (MVME162_IRQ_SCCB_TX , scc_tx_int,IRQF_DISABLED , + error =request_irq (MVME162_IRQ_SCCB_TX , scc_tx_int,IRQF_DISABLED ,"SCC-B TX" , port); -request_irq (MVME162_IRQ_SCCB_STAT , scc_stat_int,IRQF_DISABLED , +if (error) + goto fail_free_a_spcond; + error =request_irq (MVME162_IRQ_SCCB_STAT , scc_stat_int,IRQF_DISABLED ,"SCC-B status" , port); -request_irq (MVME162_IRQ_SCCB_RX , scc_rx_int,IRQF_DISABLED , +if (error) + goto fail_free_b_tx; + error =request_irq (MVME162_IRQ_SCCB_RX , scc_rx_int,IRQF_DISABLED ,"SCC-B RX" , port); -request_irq (MVME162_IRQ_SCCB_SPCOND , scc_spcond_int,IRQF_DISABLED , -"SCC-B special cond" , port); +if (error) + goto fail_free_b_stat; + error =request_irq (MVME162_IRQ_SCCB_SPCOND , scc_spcond_int, +IRQF_DISABLED ,"SCC-B special cond" , port); +if (error) + goto fail_free_b_rx; {SCC_ACCESS_INIT (port);/* Either channel will do */
@@ -323,6 +377,23 @@ static int mvme162_scc_init(void)scc_init_drivers ();return 0 ; + +fail_free_b_rx: +free_irq (MVME162_IRQ_SCCB_RX , port); +fail_free_b_stat: +free_irq (MVME162_IRQ_SCCB_STAT , port); +fail_free_b_tx: +free_irq (MVME162_IRQ_SCCB_TX , port); +fail_free_a_spcond: +free_irq (MVME162_IRQ_SCCA_SPCOND , port); +fail_free_a_rx: +free_irq (MVME162_IRQ_SCCA_RX , port); +fail_free_a_stat: +free_irq (MVME162_IRQ_SCCA_STAT , port); +fail_free_a_tx: +free_irq (MVME162_IRQ_SCCA_TX , port); +fail: + return error; }#endif
@@ -331,6 +402,7 @@ static int mvme162_scc_init(void)static int bvme6000_scc_init (void ) {struct scc_port *port; +int error;printk (KERN_INFO "SCC: BVME6000 Serial Driver\n" );/* Init channel A */
@@ -340,14 +412,23 @@ static int bvme6000_scc_init(void) port->datap = port->ctrlp +4 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (BVME_IRQ_SCCA_TX , scc_tx_int,IRQF_DISABLED , + error =request_irq (BVME_IRQ_SCCA_TX , scc_tx_int,IRQF_DISABLED ,"SCC-A TX" , port); -request_irq (BVME_IRQ_SCCA_STAT , scc_stat_int,IRQF_DISABLED , +if (error) + goto fail; + error =request_irq (BVME_IRQ_SCCA_STAT , scc_stat_int,IRQF_DISABLED ,"SCC-A status" , port); -request_irq (BVME_IRQ_SCCA_RX , scc_rx_int,IRQF_DISABLED , +if (error) + goto fail_free_a_tx; + error =request_irq (BVME_IRQ_SCCA_RX , scc_rx_int,IRQF_DISABLED ,"SCC-A RX" , port); -request_irq (BVME_IRQ_SCCA_SPCOND , scc_spcond_int,IRQF_DISABLED , -"SCC-A special cond" , port); +if (error) + goto fail_free_a_stat; + error =request_irq (BVME_IRQ_SCCA_SPCOND , scc_spcond_int, +IRQF_DISABLED ,"SCC-A special cond" , port); +if (error) + goto fail_free_a_rx; + {SCC_ACCESS_INIT (port);
@@ -367,14 +448,22 @@ static int bvme6000_scc_init(void) port->datap = port->ctrlp +4 ; port->port_a = &scc_ports[0 ]; port->port_b = &scc_ports[1 ]; -request_irq (BVME_IRQ_SCCB_TX , scc_tx_int,IRQF_DISABLED , + error =request_irq (BVME_IRQ_SCCB_TX , scc_tx_int,IRQF_DISABLED ,"SCC-B TX" , port); -request_irq (BVME_IRQ_SCCB_STAT , scc_stat_int,IRQF_DISABLED , +if (error) + goto fail_free_a_spcond; + error =request_irq (BVME_IRQ_SCCB_STAT , scc_stat_int,IRQF_DISABLED ,"SCC-B status" , port); -request_irq (BVME_IRQ_SCCB_RX , scc_rx_int,IRQF_DISABLED , +if (error) + goto fail_free_b_tx; + error =request_irq (BVME_IRQ_SCCB_RX , scc_rx_int,IRQF_DISABLED ,"SCC-B RX" , port); -request_irq (BVME_IRQ_SCCB_SPCOND , scc_spcond_int,IRQF_DISABLED , -"SCC-B special cond" , port); +if (error) + goto fail_free_b_stat; + error =request_irq (BVME_IRQ_SCCB_SPCOND , scc_spcond_int, +IRQF_DISABLED ,"SCC-B special cond" , port); +if (error) + goto fail_free_b_rx; {SCC_ACCESS_INIT (port);/* Either channel will do */
@@ -388,6 +477,23 @@ static int bvme6000_scc_init(void)scc_init_drivers ();return 0 ; + +fail: +free_irq (BVME_IRQ_SCCA_STAT , port); +fail_free_a_tx: +free_irq (BVME_IRQ_SCCA_RX , port); +fail_free_a_stat: +free_irq (BVME_IRQ_SCCA_SPCOND , port); +fail_free_a_rx: +free_irq (BVME_IRQ_SCCB_TX , port); +fail_free_a_spcond: +free_irq (BVME_IRQ_SCCB_STAT , port); +fail_free_b_tx: +free_irq (BVME_IRQ_SCCB_RX , port); +fail_free_b_stat: +free_irq (BVME_IRQ_SCCB_SPCOND , port); +fail_free_b_rx: + return error; }#endif
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: ser_a2232 - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- drivers/char/ser_a2232.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
drivers/char/ser_a2232.c +10 -2
@@ -717,6 +717,7 @@ static int __init a2232board_init(void)u_char *from;volatile u_char *to;volatile struct a2232memory *mem; +int error, i;#ifdef CONFIG_SMP return -ENODEV ;/* This driver is not SMP aware. Is there an SMP ZorroII-bus-machine? */
@@ -796,8 +797,15 @@ static int __init a2232board_init(void)*/ if (a2232_init_drivers ())return -ENODEV ;// maybe we should use a different -Exxx? -request_irq (IRQ_AMIGA_VERTB , a2232_vbl_inter,0 ,"A2232 serial VBL" , a2232_driver_ID); -return 0 ; + error =request_irq (IRQ_AMIGA_VERTB , a2232_vbl_inter,0 , +"A2232 serial VBL" , a2232_driver_ID); +if (error) { +for (i =0 ; i < nr_a2232; i++) +zorro_release_device (zd_a2232[i]); +tty_unregister_driver (a2232_driver); +put_tty_driver (a2232_driver); + } +return error; } static void __exit a2232board_exit(void)
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: scsi - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- drivers/scsi/a2091.c | 18 ++++++++++++------ drivers/scsi/gvp11.c | 8 ++++++-- 2 files changed, 18 insertions(+), 8 deletions(-)
drivers/scsi/a2091.c +12 -6
@@ -169,10 +169,8 @@ int __init a2091_detect(struct scsi_host_template *tpnt)continue ; instance =scsi_register (tpnt,sizeof (struct WD33C93_hostdata )); -if (instance ==NULL ) { -release_mem_region (address,256 ); -continue ; - } +if (instance ==NULL ) + goto release; instance->base =ZTWO_VADDR (address); instance->irq =IRQ_AMIGA_PORTS ; instance->unique_id = z->slotaddr;
@@ -183,10 +181,18 @@ int __init a2091_detect(struct scsi_host_template *tpnt)HDATA (instance)->fast =0 ;HDATA (instance)->dma_mode =CTRL_DMA ;wd33c93_init (instance, regs, dma_setup, dma_stop,WD33C93_FS_8_10 ); -request_irq (IRQ_AMIGA_PORTS , a2091_intr,IRQF_SHARED ,"A2091 SCSI" , - instance); +if (request_irq (IRQ_AMIGA_PORTS , a2091_intr,IRQF_SHARED ,"A2091 SCSI" , + instance)) + goto unregister;DMA (instance)->CNTR =CNTR_PDMD |CNTR_INTEN ; num_a2091++; +continue ; + +unregister: +scsi_unregister (instance); +wd33c93_release (); +release: +release_mem_region (address,256 ); }return num_a2091;
drivers/scsi/gvp11.c +6 -2
@@ -329,12 +329,16 @@ int __init gvp11_detect(struct scsi_host_template *tpnt) (epc &GVP_SCSICLKMASK ) ?WD33C93_FS_8_10 : WD33C93_FS_12_15); -request_irq (IRQ_AMIGA_PORTS , gvp11_intr,IRQF_SHARED ,"GVP11 SCSI" , - instance); +if (request_irq (IRQ_AMIGA_PORTS , gvp11_intr,IRQF_SHARED ,"GVP11 SCSI" , + instance)) + goto unregister;DMA (instance)->CNTR =GVP11_DMAC_INT_ENABLE ; num_gvp11++;continue ; +unregister: +scsi_unregister (instance); +wd33c93_release (); release:release_mem_region (address,256 ); }
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: atafb - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- drivers/video/atafb.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
drivers/video/atafb.c +7 -4
@@ -3075,8 +3075,7 @@ int __init atafb_setup(char *options)int __init atafb_init (void ) { -int pad; -int detected_mode; +int pad, detected_mode, error;unsigned int defmode =0 ;unsigned long mem_req;
@@ -3116,8 +3115,12 @@ int __init atafb_init(void)printk ("atafb_init: initializing Falcon hw\n" ); fbhw = &falcon_switch; atafb_ops.fb_setcolreg = &falcon_setcolreg; -request_irq (IRQ_AUTO_4 , falcon_vbl_switcher,IRQ_TYPE_PRIO , -"framebuffer/modeswitch" , falcon_vbl_switcher); + error =request_irq (IRQ_AUTO_4 , falcon_vbl_switcher, +IRQ_TYPE_PRIO , +"framebuffer/modeswitch" , + falcon_vbl_switcher); +if (error) +return error; defmode =DEFMODE_F30 ;break ; }
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: amiserial - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
and clean up the error path handling.
--- drivers/char/amiserial.c | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-)
drivers/char/amiserial.c +30 -6
@@ -1963,6 +1963,7 @@ static int __init rs_init(void) {unsigned long flags;struct serial_state * state; +int error;if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT (AMI_SERIAL ))return -ENODEV ;
@@ -1975,8 +1976,11 @@ static int __init rs_init(void)* We request SERDAT and SERPER only, because the serial registers are * too spreaded over the custom register space */ -if (!request_mem_region (CUSTOM_PHYSADDR +0x30 ,4 ,"amiserial [Paula]" )) -return -EBUSY ; +if (!request_mem_region (CUSTOM_PHYSADDR +0x30 ,4 , +"amiserial [Paula]" )) { + error = -EBUSY ; + goto fail_put_tty_driver; + } IRQ_ports =NULL ;
@@ -1997,8 +2001,9 @@ static int __init rs_init(void) serial_driver->flags =TTY_DRIVER_REAL_RAW ;tty_set_operations (serial_driver, &serial_ops); -if (tty_register_driver (serial_driver)) -panic ("Couldn't register serial driver\n" ); + error =tty_register_driver (serial_driver); +if (error) + goto fail_release_mem_region; state = rs_table; state->magic =SSTATE_MAGIC ;
@@ -2024,8 +2029,14 @@ static int __init rs_init(void)local_irq_save (flags);/* set ISRs, and then disable the rx interrupts */ -request_irq (IRQ_AMIGA_TBE , ser_tx_int,0 ,"serial TX" , state); -request_irq (IRQ_AMIGA_RBF , ser_rx_int,IRQF_DISABLED ,"serial RX" , state); + error =request_irq (IRQ_AMIGA_TBE , ser_tx_int,0 ,"serial TX" , state); +if (error) + goto fail_unregister; + + error =request_irq (IRQ_AMIGA_RBF , ser_rx_int,IRQF_DISABLED , +"serial RX" , state); +if (error) + goto fail_free_irq;/* turn off Rx and Tx interrupts */ custom.intena =IF_RBF |IF_TBE ;
@@ -2045,6 +2056,16 @@ static int __init rs_init(void) ciab.ddra &= ~(SER_DCD |SER_CTS |SER_DSR );/* inputs */ return 0 ; + +fail_free_irq: +free_irq (IRQ_AMIGA_TBE , state); +fail_unregister: +tty_unregister_driver (serial_driver); +fail_release_mem_region: +release_mem_region (CUSTOM_PHYSADDR +0x30 ,4 ); +fail_put_tty_driver: +put_tty_driver (serial_driver); +return error; } static __exit void rs_exit(void)
@@ -2064,6 +2085,9 @@ static __exit void rs_exit(void)kfree (info); } +free_irq (IRQ_AMIGA_TBE , rs_table); +free_irq (IRQ_AMIGA_RBF , rs_table); +release_mem_region (CUSTOM_PHYSADDR +0x30 ,4 ); }
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: dio - kill warn_unused_result warnings
warning: ignoring return value of 'device_register', declared with attribute warn_unused_result
warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result
--- drivers/dio/dio-sysfs.c | 16 ++++++++++------ drivers/dio/dio.c | 18 +++++++++++++++--- include/linux/dio.h | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-)
drivers/dio/dio-sysfs.c +10 -6
@@ -63,15 +63,19 @@ static ssize_t dio_show_resource(struct device *dev, struct device_attribute *at } static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL); -void dio_create_sysfs_dev_files (struct dio_dev *d) +int dio_create_sysfs_dev_files (struct dio_dev *d) {struct device *dev = &d->dev; +int error;/* current configuration's attributes */ -device_create_file (dev, &dev_attr_id); -device_create_file (dev, &dev_attr_ipl); -device_create_file (dev, &dev_attr_secid); -device_create_file (dev, &dev_attr_name); -device_create_file (dev, &dev_attr_resource); +if ((error =device_create_file (dev, &dev_attr_id)) || + (error =device_create_file (dev, &dev_attr_ipl)) || + (error =device_create_file (dev, &dev_attr_secid)) || + (error =device_create_file (dev, &dev_attr_name)) || + (error =device_create_file (dev, &dev_attr_resource))) +return error; + +return 0 ; }
drivers/dio/dio.c +15 -3
@@ -173,6 +173,7 @@ static int __init dio_init(void)mm_segment_t fs;int i;struct dio_dev *dev; +int error;if (!MACH_IS_HP300 )return 0 ;
@@ -182,7 +183,11 @@ static int __init dio_init(void)/* Initialize the DIO bus */ INIT_LIST_HEAD (&dio_bus.devices);strcpy (dio_bus.dev.bus_id,"dio" ); -device_register (&dio_bus.dev); + error =device_register (&dio_bus.dev); +if (error) { +pr_err ("DIO: Error registering dio_bus\n" ); +return error; + }/* Request all resources */ dio_bus.num_resources = (hp300_model ==HP_320 ?1 :2 );
@@ -252,8 +257,15 @@ static int __init dio_init(void)if (scode >=DIOII_SCBASE )iounmap (va); -device_register (&dev->dev); -dio_create_sysfs_dev_files (dev); + error =device_register (&dev->dev); +if (error) { +pr_err ("DIO: Error registering device %s\n" , + dev->name); +continue ; + } + error =dio_create_sysfs_dev_files (dev); +if (error) +dev_err (&dev->dev,"Error creating sysfs files\n" ); }return 0 ; }
include/linux/dio.h +1 -1
@@ -241,7 +241,7 @@ struct dio_driver {extern int dio_find (int deviceid);extern unsigned long dio_scodetophysaddr (int scode); -extern void dio_create_sysfs_dev_files (struct dio_dev *); +extern int dio_create_sysfs_dev_files (struct dio_dev *);/* New-style probing */ extern int dio_register_driver (struct dio_driver *);
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: zorro - kill warn_unused_result warnings
warning: ignoring return value of 'device_register', declared with attribute warn_unused_result
warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result
--- drivers/zorro/zorro-sysfs.c | 22 +++++++++++++--------- drivers/zorro/zorro.c | 17 ++++++++++++++--- drivers/zorro/zorro.h | 2 +- 3 files changed, 28 insertions(+), 13 deletions(-)
drivers/zorro/zorro-sysfs.c +13 -9
@@ -87,18 +87,22 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, static DEVICE_ATTR(modalias, S_IRUGO, modalias_show, NULL); -void zorro_create_sysfs_dev_files (struct zorro_dev *z) +int zorro_create_sysfs_dev_files (struct zorro_dev *z) {struct device *dev = &z->dev; +int error;/* current configuration's attributes */ -device_create_file (dev, &dev_attr_id); -device_create_file (dev, &dev_attr_type); -device_create_file (dev, &dev_attr_serial); -device_create_file (dev, &dev_attr_slotaddr); -device_create_file (dev, &dev_attr_slotsize); -device_create_file (dev, &dev_attr_resource); -device_create_file (dev, &dev_attr_modalias); -sysfs_create_bin_file (&dev->kobj, &zorro_config_attr); +if ((error =device_create_file (dev, &dev_attr_id)) || + (error =device_create_file (dev, &dev_attr_type)) || + (error =device_create_file (dev, &dev_attr_serial)) || + (error =device_create_file (dev, &dev_attr_slotaddr)) || + (error =device_create_file (dev, &dev_attr_slotsize)) || + (error =device_create_file (dev, &dev_attr_resource)) || + (error =device_create_file (dev, &dev_attr_modalias)) || + (error =sysfs_create_bin_file (&dev->kobj, &zorro_config_attr))) +return error; + +return 0 ; }
drivers/zorro/zorro.c +14 -3
@@ -130,6 +130,7 @@ static int __init zorro_init(void) {struct zorro_dev *z;unsigned int i; +int error;if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT (ZORRO ))return 0 ;
@@ -140,7 +141,11 @@ static int __init zorro_init(void)/* Initialize the Zorro bus */ INIT_LIST_HEAD (&zorro_bus.devices);strcpy (zorro_bus.dev.bus_id,"zorro" ); -device_register (&zorro_bus.dev); + error =device_register (&zorro_bus.dev); +if (error) { +pr_err ("Zorro: Error registering zorro_bus\n" ); +return error; + }/* Request the resources */ zorro_bus.num_resources =AMIGAHW_PRESENT (ZORRO3 ) ?4 :2 ;
@@ -167,8 +172,14 @@ static int __init zorro_init(void)sprintf (z->dev.bus_id,"%02x" , i); z->dev.parent = &zorro_bus.dev; z->dev.bus = &zorro_bus_type; -device_register (&z->dev); -zorro_create_sysfs_dev_files (z); + error =device_register (&z->dev); +if (error) { +pr_err ("Zorro: Error registering device %s\n" , z->name); +continue ; + } + error =zorro_create_sysfs_dev_files (z); +if (error) +dev_err (&z->dev,"Error creating sysfs files\n" ); }/* Mark all available Zorro II memory */
drivers/zorro/zorro.h +1 -1
@@ -1,4 +1,4 @@extern void zorro_name_device (struct zorro_dev *z); -extern void zorro_create_sysfs_dev_files (struct zorro_dev *z); +extern int zorro_create_sysfs_dev_files (struct zorro_dev *z);
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: dio - kill resource_size_t format warnings
warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
--- drivers/dio/dio-sysfs.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/dio/dio-sysfs.c +2 -1
@@ -58,7 +58,8 @@ static ssize_t dio_show_resource(struct device *dev, struct device_attribute *atstruct dio_dev *d =to_dio_dev (dev);return sprintf (buf,"0x%08lx 0x%08lx 0x%08lx\n" , -dio_resource_start (d),dio_resource_end (d), + (unsigned long )dio_resource_start (d), + (unsigned long )dio_resource_end (d),dio_resource_flags (d)); } static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL);
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: zorro - use %pR to print resources
--- drivers/zorro/zorro.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/zorro/zorro.c +2 -4
@@ -165,10 +165,8 @@ static int __init zorro_init(void)zorro_name_device (z); z->resource.name = z->name;if (request_resource (zorro_find_parent_resource (z), &z->resource)) -printk (KERN_ERR "Zorro: Address space collision on device %s " -"[%lx:%lx]\n" , - z->name, (unsigned long )zorro_resource_start (z), - (unsigned long )zorro_resource_end (z)); +pr_err ("Zorro: Address space collision on device %s %pR\n" , + z->name, &z->resource);sprintf (z->dev.bus_id,"%02x" , i); z->dev.parent = &zorro_bus.dev; z->dev.bus = &zorro_bus_type;
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: dmasound - kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
--- sound/oss/dmasound/dmasound_atari.c | 5 +++-- sound/oss/dmasound/dmasound_q40.c | 16 ++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-)
sound/oss/dmasound/dmasound_atari.c +3 -2
@@ -851,8 +851,9 @@ static int __init AtaIrqInit(void) mfp.tim_dt_a =1 ;/* Cause interrupt after first event. */ mfp.tim_ct_a =8 ;/* Turn on event counting. */ /* Register interrupt handler. */ -request_irq (IRQ_MFP_TIMA , AtaInterrupt,IRQ_TYPE_SLOW ,"DMA sound" , - AtaInterrupt); +if (request_irq (IRQ_MFP_TIMA , AtaInterrupt,IRQ_TYPE_SLOW ,"DMA sound" , + AtaInterrupt)) +return 0 ; mfp.int_en_a |=0x20 ;/* Turn interrupt on. */ mfp.int_mk_a |=0x20 ;return 1 ;
sound/oss/dmasound/dmasound_q40.c +10 -6
@@ -371,8 +371,9 @@ static void Q40Free(void *ptr, unsigned int size)static int __init Q40IrqInit (void ) {/* Register interrupt handler. */ -request_irq (Q40_IRQ_SAMPLE , Q40StereoInterrupt,0 , -"DMA sound" , Q40Interrupt); +if (request_irq (Q40_IRQ_SAMPLE , Q40StereoInterrupt,0 , +"DMA sound" , Q40Interrupt)) +return 0 ;return (1 ); }
@@ -401,6 +402,7 @@ static void Q40PlayNextFrame(int index)u_char *start;u_long size;u_char speed; +int error;/* used by Q40Play() if all doubts whether there really is something * to be played are already wiped out.
@@ -419,11 +421,13 @@ static void Q40PlayNextFrame(int index)master_outb (0 ,SAMPLE_ENABLE_REG );free_irq (Q40_IRQ_SAMPLE , Q40Interrupt);if (dmasound.soft.stereo) -request_irq (Q40_IRQ_SAMPLE , Q40StereoInterrupt,0 , -"Q40 sound" , Q40Interrupt); + error =request_irq (Q40_IRQ_SAMPLE , Q40StereoInterrupt,0 , +"Q40 sound" , Q40Interrupt);else -request_irq (Q40_IRQ_SAMPLE , Q40MonoInterrupt,0 , -"Q40 sound" , Q40Interrupt); + error =request_irq (Q40_IRQ_SAMPLE , Q40MonoInterrupt,0 , +"Q40 sound" , Q40Interrupt); +if (error &&printk_ratelimit ()) +pr_err ("Couldn't register sound interrupt\n" );master_outb ( speed,SAMPLE_RATE_REG );master_outb (1 ,SAMPLE_CLEAR_REG );
Signature · 1 line
1.5.6.5
Geert Uytterhoeven
maintainerPATCH 1/1 m68k: atari_scc - kill fake config variables
Rename CONFIG_{TT,FALCON,ST}_SCC to SUPPORT_{TT,FALCON,ST}_SCC and reduce ifdef clutter
--- drivers/char/atari_scc.c | 39 ++++++++++++++++++++++++--------------- 1 files changed, 24 insertions(+), 15 deletions(-)
drivers/char/atari_scc.c +24 -15
@@ -49,9 +49,9 @@#include "scc.h" -#define CONFIG_TT_SCC 1 -#define CONFIG_FALCON_SCC 1 -#define CONFIG_ST_SCC 1 +#define SUPPORT_TT_SCC 1 +#define SUPPORT_FALCON_SCC 1 +#define SUPPORT_ST_SCC 1#define CHANNEL_A 0#define CHANNEL_B 1
@@ -364,7 +364,7 @@ static void atari_scc_b_free_irqs(struct scc_port *port)free_irq (IRQ_SCCB_SPCOND , port); } -#ifdef CONFIG_TT_SCC +#ifdef SUPPORT_TT_SCC static int atari_tt_scc_init (void ) {struct scc_port *port;
@@ -464,10 +464,15 @@ static int atari_tt_scc_init(void)return 0 ; } -#endif +#else /* !SUPPORT_TT_SCC */ +static inline int atari_tt_scc_init (void ) +{ +return -ENODEV ; +} +#endif /* !SUPPORT_TT_SCC */ -#ifdef CONFIG_FALCON_SCC +#ifdef SUPPORT_FALCON_SCC static int atari_falcon_scc_init (void ) {struct scc_port *port;
@@ -541,10 +546,15 @@ static int atari_falcon_scc_init(void)return 0 ; } -#endif +#else /* !SUPPORT_FALCON_SCC */ +static inline int atari_falcon_scc_init (void ) +{ +return -ENODEV ; +} +#endif /* !SUPPORT_FALCON_SCC */ -#ifdef CONFIG_ST_SCC +#ifdef SUPPORT_ST_SCC static int atari_st_scc_init (void ) {struct scc_port *port;
@@ -618,7 +628,12 @@ static int atari_st_scc_init(void) return 0; } -#endif +#else /* !SUPPORT_ST_SCC */ +static inline int atari_st_scc_init (void ) +{ +return -ENODEV ; +} +#endif /* !SUPPORT_ST_SCC */ int atari_scc_init (void )
@@ -635,18 +650,12 @@ int atari_scc_init(void) scc_del = &mfp.par_dt_reg; -#ifdef CONFIG_TT_SCC if (MACH_IS_TT ) res =atari_tt_scc_init (); -#endif -#ifdef CONFIG_FALCON_SCC if (MACH_IS_FALCON ) res =atari_falcon_scc_init (); -#endif -#ifdef CONFIG_ST_SCC if (MACH_IS_ST ) res =atari_st_scc_init (); -#endif return res; }
Signature · 1 line
1.5.6.5