Re: [PATCH V3 2/6] tty: serial: meson: Request the register region in meson_uart_probe()

From: Martin Blumenstingl
Date: Thu Dec 30 2021 - 17:29:10 EST


Hi Greg,

On Thu, Dec 30, 2021 at 1:29 PM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
[...]
> > static void meson_uart_release_port(struct uart_port *port)
> > {
> > - devm_iounmap(port->dev, port->membase);
> > - port->membase = NULL;
> > - devm_release_mem_region(port->dev, port->mapbase, port->mapsize);
> > + /* nothing to do */
> > }
>
> Are you sure a release call like this can be "empty"? That goes against
> the normal way the driver model works. If it is empty, why have it at
> all?
In patch #4 from this series some logic is added here again.
I can think of three options here (in no particular order):
- keep this patch as-is
- remove the empty function from this patch and it back in patch #4
from this series
- try to split some of the logic from patch #4 so the relevant
clk_prepare_enable/clk_disable_unpepare calls are added here (meaning
that this function has logic inside it at all times throughout this
series)
- (if you have another suggestion then please let us know)


Best regards,
Martin