Il giorno mer, 31/10/2007 alle 13.08 +0000, Ralf Baechle ha scritto:
> > diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
> > index 3bb5d24..7caa877 100644
> > --- a/drivers/serial/serial_core.c
> > +++ b/drivers/serial/serial_core.c
> > @@ -2455,6 +2455,8 @@ int uart_match_port(struct uart_port *port1, struct
> > uart_port *port2)
> > case UPIO_AU:
> > case UPIO_TSI:
> > case UPIO_DWAPB:
> > + if (port1->mapbase==0 && port2->mapbase==0)
> > + return (port1->membase == port2->membase);
> This hack is only needed because ->mapbase is not initialized.
I have been investigating about it for one week and I am still not
convinced that mapbase must be initialised. I tried to understand the
meaning of mapbase and membase, but I am unsure about the value I should
set mapbase to.
I learnt that when specifying mapbase its region would be registered and
reserved using request_mem_region(). Otherwise, if you do not specify
mapbase, the region is not reserved. Apart from reserving the memory
region, mapbase isn't use anymore. Is mapbase mandatory?
If mapbase isn't mandatory, the second part of my patch is probably
right and fixes a bug.