From: Andrew Morton <akpm@osdl.org>
To: Max Asbock <masbock@us.ibm.com>
Cc: tony@bakeyournoodle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Kconfig dependancy update for drivers/misc/ibmasm
Date: Tue, 20 Apr 2004 16:42:31 -0700 [thread overview]
Message-ID: <20040420164231.2fd3518a.akpm@osdl.org> (raw)
In-Reply-To: <1082501343.6129.180.camel@DYN318100BLD.beaverton.ibm.com>
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
}
_
next prev parent reply other threads:[~2004-04-20 23:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 21:01 Tony Breeds
2004-04-20 21:34 ` Andrew Morton
2004-04-20 21:41 ` Tony Breeds
2004-04-20 22:49 ` Max Asbock
2004-04-20 23:42 ` Andrew Morton [this message]
2004-04-21 0:17 ` Max Asbock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040420164231.2fd3518a.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masbock@us.ibm.com \
--cc=tony@bakeyournoodle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®