summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-02-19 16:04:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-02 21:52:06 +0100
commit7a345dc19a7c01a04a2d7bcd79238389b0838b78 (patch)
tree86d4e6e834abbe4fab7d64c4cb47751b5067fa1f /drivers/tty/serial/8250
parentserial: 8250_exar: Don't remove GPIO device on suspend (diff)
downloadlinux-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.c3
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++)