[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vd1i4Pidw11ddMwtfvvtLk3cCuUMfg8Q8v-FPsOkbMhag@mail.gmail.com>
Date: Sun, 27 Dec 2015 14:39:36 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Geliang Tang <geliangtang@....com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/9] serial: 8250_pci: use to_pci_dev()
On Sun, Dec 27, 2015 at 12:46 PM, Geliang Tang <geliangtang@....com> wrote:
> Use to_pci_dev() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@....com>
> ---
> drivers/tty/serial/8250/8250_pci.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> index 4097f3f..afdd2c67 100644
> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -1538,8 +1538,7 @@ static int pci_fintek_rs485_config(struct uart_port *port,
> {
> u8 setting;
> u8 *index = (u8 *) port->private_data;
> - struct pci_dev *pci_dev = container_of(port->dev, struct pci_dev,
> - dev);
> + struct pci_dev *pci_dev = to_pci_dev(port->dev);
I would make it first line in this block.
Otherwise,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
> pci_read_config_byte(pci_dev, 0x40 + 8 * *index + 7, &setting);
>
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists