diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-02-19 16:04:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-02 21:52:06 +0100 |
commit | 7a345dc19a7c01a04a2d7bcd79238389b0838b78 (patch) | |
tree | 86d4e6e834abbe4fab7d64c4cb47751b5067fa1f /drivers/tty/serial/8250 | |
parent | serial: 8250_exar: Don't remove GPIO device on suspend (diff) | |
download | linux-7a345dc19a7c01a04a2d7bcd79238389b0838b78.tar.xz linux-7a345dc19a7c01a04a2d7bcd79238389b0838b78.zip |
serial: 8250_exar: Use dev_get_drvdata() directly in PM callbacks
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>
Link: https://lore.kernel.org/r/20240219150627.2101198-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r-- | drivers/tty/serial/8250/8250_exar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index dab94835b6f5..5687b21b328d 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -760,8 +760,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++) |