[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfVm5B7NawwYdzNFkCgJG+2Ht8pkAL0Drr08GJ+p2ZVow@mail.gmail.com>
Date: Mon, 5 Mar 2018 17:17:04 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Michael Moese <mmoese@...e.de>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
Johannes Thumshirn <jthumshirn@...e.de>,
Andreas Geissler <andreas.geissler@....de>,
Ben Turner <ben.turner@...et.com>
Subject: Re: [PATCH v3] 8250-men-mcb: add support for 16z025 and 16z057
On Mon, Mar 5, 2018 at 10:22 AM, Michael Moese <mmoese@...e.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
Powered by blists - more mailing lists