lkml.org 
[lkml]   [2018]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] 8250-men-mcb: add support for 16z025 and 16z057
On Tue, Feb 27, 2018 at 5:31 PM, 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.

> - else if (strncmp(mdev->bus->name, "F216", 4) == 0)
> + else if (strncmp(mdev->bus->name, "F216", 4) == 0)

What's changed?

> clkval = 1843200;


> + switch (mdev->id) {
> + case MEN_UART_ID_Z125:
> + num_ports = 1U;
> + break;
> + case MEN_UART_ID_Z025:
> + num_ports = readb(membase) >> 4;
> + break;
> + case MEN_UART_ID_Z057:
> + num_ports = 4U;
> + break;
> + default:
> + dev_err(&mdev->dev, "no supported device!\n");
> + return -ENODEV;
> + }

(1)

> + data[i].uart.port.mapbase = (unsigned long) mem->start
> + + (i * MEN_UART_MEM_SIZE);

Redundant parens.


> + switch (mdev->id) {
> + case MEN_UART_ID_Z125:
> + num_ports = 1U;
> + break;
> + case MEN_UART_ID_Z025:
> + num_ports = readb(data[0].uart.port.membase) >> 4;
> + break;
> + case MEN_UART_ID_Z057:
> + num_ports = 4U;
> + break;
> + default:
> + dev_err(&mdev->dev, "no supported device!\n");
> + return;
> + }

Can you deduplicate this with (1)?


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-02-27 18:58    [W:0.039 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site