Skip to contentSkip to conversation

parport: Add missing newline at end of file

PATCH New Sudip Mukherjee 1 participant 3 messages Aug 1, 2019 Parallel port

lore
Share & tools
lore

Sudip Mukherjee

author maintainer
#0 lore raw

PATCH 1/3 parport: Add missing newline at end of file

From: Geert Uytterhoeven <[email protected]>

"git diff" says:

\ No newline at end of file

after modifying the file.

---
 drivers/parport/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/parport/Makefile +1 -1
index 6fa41f8173b6..022c566c0f32 100644
@@ -19,4 +19,4 @@ obj-$(CONFIG_PARPORT_ATARI)	+= parport_atari.o
 obj-$(CONFIG_PARPORT_SUNBPP)	+= parport_sunbpp.o
 obj-$(CONFIG_PARPORT_GSC)	+= parport_gsc.o
 obj-$(CONFIG_PARPORT_AX88796)	+= parport_ax88796.o
-obj-$(CONFIG_PARPORT_IP32)	+= parport_ip32.o
\ No newline at end of file
+obj-$(CONFIG_PARPORT_IP32)	+= parport_ip32.o
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 2/3 ppdev: add header include guard

From: Masahiro Yamada <[email protected]>

Add a header include guard just in case.

---
 include/uapi/linux/ppdev.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/uapi/linux/ppdev.h +4 -1
index 8fe3c64d149e..eb895b83f2bd 100644
@@ -15,6 +15,9 @@
  * Added PPGETMODES/PPGETMODE/PPGETPHASE, Fred Barnes <[email protected]>, 03/01/2001
  */
 
+#ifndef _UAPI_LINUX_PPDEV_H
+#define _UAPI_LINUX_PPDEV_H
+
 #define PP_IOCTL	'p'
 
 /* Set mode for read/write (e.g. IEEE1284_MODE_EPP) */
@@ -97,4 +100,4 @@ struct ppdev_frob_struct {
 /* only masks user-visible flags */
 #define PP_FLAGMASK	(PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC)
 
-
+#endif /* _UAPI_LINUX_PPDEV_H */
Signature · 1 line
2.11.0
author maintainer
#2 lore raw

PATCH 3/3 parport: parport_serial: Use dev_get_drvdata

In reply to Sudip Mukherjee

From: Chuhong Yuan <[email protected]>

Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

---
 drivers/parport/parport_serial.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/parport/parport_serial.c +2 -4
index 461fd8a24278..b11f5d238eda 100644
@@ -660,8 +660,7 @@ static void parport_serial_pci_remove(struct pci_dev *dev)
 
 static int __maybe_unused parport_serial_pci_suspend(struct device *dev)
 {
-	struct pci_dev *pdev = to_pci_dev(dev);
-	struct parport_serial_private *priv = pci_get_drvdata(pdev);
+	struct parport_serial_private *priv = dev_get_drvdata(dev);
 
 	if (priv->serial)
 		pciserial_suspend_ports(priv->serial);
@@ -672,8 +671,7 @@ static int __maybe_unused parport_serial_pci_suspend(struct device *dev)
 
 static int __maybe_unused parport_serial_pci_resume(struct device *dev)
 {
-	struct pci_dev *pdev = to_pci_dev(dev);
-	struct parport_serial_private *priv = pci_get_drvdata(pdev);
+	struct parport_serial_private *priv = dev_get_drvdata(dev);
 
 	if (priv->serial)
 		pciserial_resume_ports(priv->serial);
Signature · 1 line
2.11.0