Message ID | 20240219150627.2101198-3-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | serial: 8250_exar: A few updates to the driver | expand |
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 6580265e1763..28478b9c537b 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -748,8 +748,7 @@ static void exar_pci_remove(struct pci_dev *pcidev) static int __maybe_unused exar_suspend(struct device *dev) { - struct pci_dev *pcidev = to_pci_dev(dev); - struct exar8250 *priv = pci_get_drvdata(pcidev); + struct exar8250 *priv = dev_get_drvdata(dev); unsigned int i; for (i = 0; i < priv->nr; i++)
PM callbacks take struct device pointer as a parameter, use dev_get_drvdata() to retrieve it instead of unneeded double loop of referencing via pci_get_drvdata(to_pci_dev(dev)). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/tty/serial/8250/8250_exar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)