serial: 8250_pci: use to_pci_dev()
authorGeliang Tang <geliangtang@163.com>
Sun, 27 Dec 2015 14:29:42 +0000 (22:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:51:04 +0000 (22:51 -0800)
Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_pci.c

index e71ec78fc11ea1ab074486c8876fa855337564fb..90025e4f3452d842e80fbbcab685687bcf5e099f 100644 (file)
@@ -1541,10 +1541,9 @@ pci_brcm_trumanage_setup(struct serial_private *priv,
 static int pci_fintek_rs485_config(struct uart_port *port,
                               struct serial_rs485 *rs485)
 {
+       struct pci_dev *pci_dev = to_pci_dev(port->dev);
        u8 setting;
        u8 *index = (u8 *) port->private_data;
-       struct pci_dev *pci_dev = container_of(port->dev, struct pci_dev,
-                                               dev);
 
        pci_read_config_byte(pci_dev, 0x40 + 8 * *index + 7, &setting);