linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] parport: Add missing newline at end of file
@ 2019-08-01 19:14 Sudip Mukherjee
  2019-08-01 19:14 ` [PATCH 2/3] ppdev: add header include guard Sudip Mukherjee
  2019-08-01 19:14 ` [PATCH 3/3] parport: parport_serial: Use dev_get_drvdata Sudip Mukherjee
  0 siblings, 2 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2019-08-01 19:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Geert Uytterhoeven, Sudip Mukherjee

From: Geert Uytterhoeven <geert+renesas@glider.be>

"git diff" says:

    \ No newline at end of file

after modifying the file.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 drivers/parport/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/Makefile b/drivers/parport/Makefile
index 6fa41f8173b6..022c566c0f32 100644
--- a/drivers/parport/Makefile
+++ b/drivers/parport/Makefile
@@ -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
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] ppdev: add header include guard
  2019-08-01 19:14 [PATCH 1/3] parport: Add missing newline at end of file Sudip Mukherjee
@ 2019-08-01 19:14 ` Sudip Mukherjee
  2019-08-01 19:14 ` [PATCH 3/3] parport: parport_serial: Use dev_get_drvdata Sudip Mukherjee
  1 sibling, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2019-08-01 19:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Masahiro Yamada, Sudip Mukherjee

From: Masahiro Yamada <yamada.masahiro@socionext.com>

Add a header include guard just in case.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 include/uapi/linux/ppdev.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/ppdev.h b/include/uapi/linux/ppdev.h
index 8fe3c64d149e..eb895b83f2bd 100644
--- a/include/uapi/linux/ppdev.h
+++ b/include/uapi/linux/ppdev.h
@@ -15,6 +15,9 @@
  * Added PPGETMODES/PPGETMODE/PPGETPHASE, Fred Barnes <frmb2@ukc.ac.uk>, 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 */
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 3/3] parport: parport_serial: Use dev_get_drvdata
  2019-08-01 19:14 [PATCH 1/3] parport: Add missing newline at end of file Sudip Mukherjee
  2019-08-01 19:14 ` [PATCH 2/3] ppdev: add header include guard Sudip Mukherjee
@ 2019-08-01 19:14 ` Sudip Mukherjee
  1 sibling, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2019-08-01 19:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Chuhong Yuan, Sudip Mukherjee

From: Chuhong Yuan <hslester96@gmail.com>

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

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 drivers/parport/parport_serial.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 461fd8a24278..b11f5d238eda 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-01 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 19:14 [PATCH 1/3] parport: Add missing newline at end of file Sudip Mukherjee
2019-08-01 19:14 ` [PATCH 2/3] ppdev: add header include guard Sudip Mukherjee
2019-08-01 19:14 ` [PATCH 3/3] parport: parport_serial: Use dev_get_drvdata Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).