Thread (3 messages) 3 messages, 2 authors, 2015-12-27

[PATCH 7/9 v2] serial: 8250_pci: use to_pci_dev()

From: Geliang Tang <hidden>
Date: 2015-12-27 14:30:29
Also in: lkml
Subsystem: 8250/16?50 (and clone uarts) serial driver, the rest, tty layer and serial drivers · Maintainers: Greg Kroah-Hartman, Linus Torvalds, Jiri Slaby

Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <redacted>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Changes in v2:
 - Made it first line in this block.
---
 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..75182c9 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1536,10 +1536,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);
 
-- 
2.5.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help