lkml.org 
[lkml]   [2018]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] 8250-men-mcb: add support for 16z025 and 16z057
On Mon, Mar 5, 2018 at 10:22 AM, Michael Moese <mmoese@suse.de> wrote:
> Add support for two MEN UARTs (16z025 and 16z057) to the
> 8250_men_mcb driver.
> The 16z025 consists of up to four ports, the 16z057 has
> exactly four ports. Apart from that, all of them share the
> Port settings.

> Changes to v2:
> Added include of linux/io.h due to finding of kbuild robot.

Hmm... Is it there?

> static int serial_8250_men_mcb_probe(struct mcb_device *mdev,
> const struct mcb_device_id *id)
> {

> mem = mcb_get_resource(mdev, IORESOURCE_MEM);

> if (mem == NULL)
> return -ENXIO;

Redundant.

> + membase = devm_ioremap_resource(&mdev->dev, mem);
> + if (IS_ERR(membase))
> + return PTR_ERR_OR_ZERO(membase);

> + for (i = 0; i < num_ports; i++) {

> + /* ok, register the port */
> + data[i].line = serial8250_register_8250_port(&data[i].uart);
> + if (data[i].line < 0) {
> + dev_err(&mdev->dev, "unable to register UART port\n");
> + return data[i].line;
> + }
> + dev_info(&mdev->dev, "found MCB UART: ttyS%d\n", data[i].line);

Consider to use struct uart_port::name instead.

> + }
>
> return 0;
> }
>
> static void serial_8250_men_mcb_remove(struct mcb_device *mdev)
> {

> + if (!data)
> + return;

When it's possible?

> }

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-03-05 16:18    [W:0.036 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site