Messages in this thread Patch in this message | | | Date | Tue, 20 Apr 2004 16:42:31 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Kconfig dependancy update for drivers/misc/ibmasm |
| |
Max Asbock <masbock@us.ibm.com> wrote: > > On Tue, 2004-04-20 at 14:34, Andrew Morton wrote: > > Tony Breeds <tony@bakeyournoodle.com> wrote: > > > > Seems sane to me, but I'm not sure why this wasn't done originally. ie, this: > > > > +#ifdef CONFIG_SERIAL_8250 > > extern void ibmasm_register_uart(struct service_processor *sp); > > extern void ibmasm_unregister_uart(struct service_processor *sp); > > +#else > > +#define ibmasm_register_uart(sp) do { } while(0) > > +#define ibmasm_unregister_uart(sp) do { } while(0) > > +#endif > > > > becomes unnecessary with your patch. > > > > Max, any preferences? > > > > The above allows the driver to be built without serial line support. It > still functions that way. uart support is only part of the driver's > functions. Therefore it makes sense to not make the whole driver depend > on SERIAL_8250 and instead only configure away the uart support when > SERIAL_8250 is not defined.
So I think you'll be needing something liek this?
25-akpm/drivers/misc/ibmasm/uart.c | 4 ++++ 1 files changed, 4 insertions(+)
diff -puN drivers/misc/ibmasm/uart.c~a drivers/misc/ibmasm/uart.c --- 25/drivers/misc/ibmasm/uart.c~a Tue Apr 20 16:41:32 2004 +++ 25-akpm/drivers/misc/ibmasm/uart.c Tue Apr 20 16:41:56 2004 @@ -54,12 +54,14 @@ void ibmasm_register_uart(struct service serial.io_type = UPIO_MEM; serial.iomem_base = iomem_base; +#ifdef CONFIG_SERIAL_8250 sp->serial_line = register_serial(&serial); if (sp->serial_line < 0) { dev_err(sp->dev, "Failed to register serial port\n"); return; } enable_uart_interrupts(sp->base_address); +#endif } void ibmasm_unregister_uart(struct service_processor *sp) @@ -68,5 +70,7 @@ void ibmasm_unregister_uart(struct servi return; disable_uart_interrupts(sp->base_address); +#ifdef CONFIG_SERIAL_8250 unregister_serial(sp->serial_line); +#endif } _
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |