Chen Gang, le Thu 31 Oct 2013 15:27:37 +0800, a écrit : > If SERIAL_PORT_DFNS isn't present by platform, it need be defined to > "nothing", like the 8250 serial driver does it. > > All related macros also need be removed: IRQF_SHARED is defined in > "linux/interrupt.h", others will be defined when related architecture > has SERIAL_PORT_DFNS. > > Or it will cause issue (for arc, with allmodconfig): > > CC [M] drivers/staging/speakup/serialio.o > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant > SERIAL_PORT_DFNS > ^ > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[0].baud_base') > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[1].baud_base') > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[2].baud_base') > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not constant > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for 'rs_table[3].baud_base') > > > Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx> Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> > --- > drivers/staging/speakup/serialio.c | 4 ++++ > drivers/staging/speakup/serialio.h | 26 -------------------------- > 2 files changed, 4 insertions(+), 26 deletions(-) > > diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c > index 1354288..4e18fb4 100644 > --- a/drivers/staging/speakup/serialio.c > +++ b/drivers/staging/speakup/serialio.c > @@ -6,6 +6,10 @@ > #include "spk_priv.h" > #include "serialio.h" > > +#ifndef SERIAL_PORT_DFNS > +#define SERIAL_PORT_DFNS > +#endif > + > static void start_serial_interrupt(int irq); > > static const struct old_serial_port rs_table[] = { > diff --git a/drivers/staging/speakup/serialio.h b/drivers/staging/speakup/serialio.h > index 55d68b5..0a93773 100644 > --- a/drivers/staging/speakup/serialio.h > +++ b/drivers/staging/speakup/serialio.h > @@ -36,30 +36,4 @@ struct old_serial_port { > > #define spk_serial_tx_busy() ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY) > > -/* 2.6.22 doesn't have them any more, hardcode it for now (these values should > - * be fine for 99% cases) */ > -#ifndef BASE_BAUD > -#define BASE_BAUD (1843200 / 16) > -#endif > -#ifndef STD_COM_FLAGS > -#ifdef CONFIG_SERIAL_DETECT_IRQ > -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) > -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) > -#else > -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) > -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF > -#endif > -#endif > -#ifndef SERIAL_PORT_DFNS > -#define SERIAL_PORT_DFNS \ > - /* UART CLK PORT IRQ FLAGS */ \ > - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ > - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ > - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ > - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ > -#endif > -#ifndef IRQF_SHARED > -#define IRQF_SHARED SA_SHIRQ > -#endif > - > #endif > -- > 1.7.7.6 > -- Samuel <macavity> bash: ls: Computer bought the farm <macavity> THAT frightens ppl! :P <macavity> id rather see: "bash: ls: Initialization of googol(AWAX) disengaged in HYPER32/64 mode due to faulty page request at AX:12A34F84B" <macavity> at least that would give me the feeling that the *programmers* knows what is going on :P (lovely Hurd...) _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel