Jan Beulich
2012-May-16 15:16 UTC
[PATCH] serial: serial_irq() and descendants can be __init
... as being solely called from smp_intr_init(), which itself is marked such. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -361,7 +361,7 @@ static void __init ns16550_endboot(struc #define ns16550_endboot NULL #endif -static int ns16550_irq(struct serial_port *port) +static int __init ns16550_irq(struct serial_port *port) { struct ns16550 *uart = port->uart; return ((uart->irq > 0) ? uart->irq : -1); --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -215,7 +215,7 @@ static int pl011_getc(struct serial_port return 1; } -static int pl011_irq(struct serial_port *port) +static int __init pl011_irq(struct serial_port *port) { struct pl011 *uart = port->uart; return ((uart->irq > 0) ? uart->irq : -1); --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -475,7 +475,7 @@ void __init serial_endboot(void) com[i].driver->endboot(&com[i]); } -int serial_irq(int idx) +int __init serial_irq(int idx) { if ( (idx >= 0) && (idx < ARRAY_SIZE(com)) && com[idx].driver && com[idx].driver->irq ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Keir Fraser
2012-May-16 15:45 UTC
Re: [PATCH] serial: serial_irq() and descendants can be __init
On 16/05/2012 16:16, "Jan Beulich" <JBeulich@suse.com> wrote:> ... as being solely called from smp_intr_init(), which itself is > marked such. > > Signed-off-by: Jan Beulich <jbeulich@suse.com>Acked-by: Keir Fraser <keir@xen.org>> --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -361,7 +361,7 @@ static void __init ns16550_endboot(struc > #define ns16550_endboot NULL > #endif > > -static int ns16550_irq(struct serial_port *port) > +static int __init ns16550_irq(struct serial_port *port) > { > struct ns16550 *uart = port->uart; > return ((uart->irq > 0) ? uart->irq : -1); > --- a/xen/drivers/char/pl011.c > +++ b/xen/drivers/char/pl011.c > @@ -215,7 +215,7 @@ static int pl011_getc(struct serial_port > return 1; > } > > -static int pl011_irq(struct serial_port *port) > +static int __init pl011_irq(struct serial_port *port) > { > struct pl011 *uart = port->uart; > return ((uart->irq > 0) ? uart->irq : -1); > --- a/xen/drivers/char/serial.c > +++ b/xen/drivers/char/serial.c > @@ -475,7 +475,7 @@ void __init serial_endboot(void) > com[i].driver->endboot(&com[i]); > } > > -int serial_irq(int idx) > +int __init serial_irq(int idx) > { > if ( (idx >= 0) && (idx < ARRAY_SIZE(com)) && > com[idx].driver && com[idx].driver->irq ) > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel