mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate
@ 2015-03-16 20:46 Peter Huewe
  2015-03-16 20:46 ` [PATCH 1/8] pnp: " Peter Huewe
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

This patchset introduces the module_pnp_driver macro which is a
convenience macro for PNP driver modules similar to module_pci_driver
and convert the affected drivers to the new helper macro.
It is intended to be used by drivers which init/exit section does nothing
but register/unregister the PNP driver. By using this macro it is
possible to eliminate a few lines of boilerplate code per PNP driver.

If easier you can pull directly from my tree:

The following changes since commit 06e5801b8cb3fc057d88cb4dc03c0b64b2744cda:

  Linux 4.0-rc4 (2015-03-15 17:38:20 -0700)

are available in the git repository at:

  https://github.com/PeterHuewe/linux-tpmdd.git module_pnp_driver

for you to fetch changes up to 5bf9cf2fdc9f22c7caa1c17a7eb2e17aab099b51:

  pnp: tty/serial/8250/8250_fintek: Use module_pnp_driver to register driver (2015-03-16 21:40:05 +0100)

----------------------------------------------------------------

Peter Huewe (8):
  pnp: Add helper macro for pnp_register_driver boilerplate
  pnp: tpm/tpm_infineon: Use module_pnp_driver to register driver
  pnp: ata/pata_isapnp: Use module_pnp_driver to register driver
  pnp: ide/ide-pnp: Use module_pnp_driver to register driver
  pnp: media/rc: Use module_pnp_driver to register driver
  pnp: net/sb1000: Use module_pnp_driver to register driver
  pnp: platform/x86/apple-gmux: Use module_pnp_driver to register driver
  pnp: tty/serial/8250/8250_fintek: Use module_pnp_driver to register
    driver

 drivers/ata/pata_isapnp.c             | 14 +-------------
 drivers/char/tpm/tpm_infineon.c       | 13 +------------
 drivers/ide/ide-pnp.c                 | 14 +-------------
 drivers/media/rc/ene_ir.c             | 13 +------------
 drivers/media/rc/fintek-cir.c         | 13 +------------
 drivers/media/rc/ite-cir.c            | 13 +------------
 drivers/media/rc/nuvoton-cir.c        | 13 +------------
 drivers/net/sb1000.c                  | 15 +--------------
 drivers/platform/x86/apple-gmux.c     | 14 +-------------
 drivers/tty/serial/8250/8250_fintek.c | 13 +------------
 include/linux/pnp.h                   | 12 ++++++++++++
 11 files changed, 22 insertions(+), 125 deletions(-)

-- 
2.0.5


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

* [PATCH 1/8] pnp: Add helper macro for pnp_register_driver boilerplate
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 2/8] pnp: tpm/tpm_infineon: Use module_pnp_driver to register driver Peter Huewe
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-kernel, Peter Huewe, Lars-Peter Clausen, Greg Kroah-Hartman

This patch introduces the module_pnp_driver macro which is a
convenience macro for PNP driver modules similar to module_pci_driver.
It is intended to be used by drivers which init/exit section does nothing
but register/unregister the PNP driver. By using this macro it is
possible to eliminate a few lines of boilerplate code per PNP driver.

Based on work done by Lars-Peter Clausen <lars@metafoo.de> for other
busses (i2c and spi) and Greg KH for PCI.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 include/linux/pnp.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 6512e9cbc6d5..5df733b8f704 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -510,4 +510,16 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { }
 
 #endif /* CONFIG_PNP */
 
+/**
+ * module_pnp_driver() - Helper macro for registering a PnP driver
+ * @__pnp_driver: pnp_driver struct
+ *
+ * Helper macro for PnP drivers which do not do anything special in module
+ * init/exit. This eliminates a lot of boilerplate. Each module may only
+ * use this macro once, and calling it replaces module_init() and module_exit()
+ */
+#define module_pnp_driver(__pnp_driver) \
+	module_driver(__pnp_driver, pnp_register_driver, \
+				    pnp_unregister_driver)
+
 #endif /* _LINUX_PNP_H */
-- 
2.0.5


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

* [PATCH 2/8] pnp: tpm/tpm_infineon: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
  2015-03-16 20:46 ` [PATCH 1/8] pnp: " Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 3/8] pnp: ata/pata_isapnp: " Peter Huewe
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/char/tpm/tpm_infineon.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c
index 6d492132ad2b..29ba520ac24d 100644
--- a/drivers/char/tpm/tpm_infineon.c
+++ b/drivers/char/tpm/tpm_infineon.c
@@ -637,18 +637,7 @@ static struct pnp_driver tpm_inf_pnp_driver = {
 	.remove = tpm_inf_pnp_remove
 };
 
-static int __init init_inf(void)
-{
-	return pnp_register_driver(&tpm_inf_pnp_driver);
-}
-
-static void __exit cleanup_inf(void)
-{
-	pnp_unregister_driver(&tpm_inf_pnp_driver);
-}
-
-module_init(init_inf);
-module_exit(cleanup_inf);
+module_pnp_driver(tpm_inf_pnp_driver);
 
 MODULE_AUTHOR("Marcel Selhorst <tpmdd@sirrix.com>");
 MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2");
-- 
2.0.5


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

* [PATCH 3/8] pnp: ata/pata_isapnp: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
  2015-03-16 20:46 ` [PATCH 1/8] pnp: " Peter Huewe
  2015-03-16 20:46 ` [PATCH 2/8] pnp: tpm/tpm_infineon: Use module_pnp_driver to register driver Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 4/8] pnp: ide/ide-pnp: " Peter Huewe
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/ata/pata_isapnp.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index b33d1f99b3a4..994f168b54a8 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -128,20 +128,8 @@ static struct pnp_driver isapnp_driver = {
 	.remove		= isapnp_remove_one,
 };
 
-static int __init isapnp_init(void)
-{
-	return pnp_register_driver(&isapnp_driver);
-}
-
-static void __exit isapnp_exit(void)
-{
-	pnp_unregister_driver(&isapnp_driver);
-}
-
+module_pnp_driver(isapnp_driver);
 MODULE_AUTHOR("Alan Cox");
 MODULE_DESCRIPTION("low-level driver for ISA PnP ATA");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
-
-module_init(isapnp_init);
-module_exit(isapnp_exit);
-- 
2.0.5


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

* [PATCH 4/8] pnp: ide/ide-pnp: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
                   ` (2 preceding siblings ...)
  2015-03-16 20:46 ` [PATCH 3/8] pnp: ata/pata_isapnp: " Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 5/8] pnp: media/rc: " Peter Huewe
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/ide/ide-pnp.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index e5f3db831373..f5f2b62471da 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -96,17 +96,5 @@ static struct pnp_driver idepnp_driver = {
 	.remove		= idepnp_remove,
 };
 
-static int __init pnpide_init(void)
-{
-	return pnp_register_driver(&idepnp_driver);
-}
-
-static void __exit pnpide_exit(void)
-{
-	pnp_unregister_driver(&idepnp_driver);
-}
-
-module_init(pnpide_init);
-module_exit(pnpide_exit);
-
+module_pnp_driver(idepnp_driver);
 MODULE_LICENSE("GPL");
-- 
2.0.5


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

* [PATCH 5/8] pnp: media/rc: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
                   ` (3 preceding siblings ...)
  2015-03-16 20:46 ` [PATCH 4/8] pnp: ide/ide-pnp: " Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 6/8] pnp: net/sb1000: " Peter Huewe
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/media/rc/ene_ir.c      | 13 +------------
 drivers/media/rc/fintek-cir.c  | 13 +------------
 drivers/media/rc/ite-cir.c     | 13 +------------
 drivers/media/rc/nuvoton-cir.c | 13 +------------
 4 files changed, 4 insertions(+), 48 deletions(-)

diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index e80f2c6c5f1a..8d77e1c4a141 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1195,16 +1195,6 @@ static struct pnp_driver ene_driver = {
 	.shutdown = ene_shutdown,
 };
 
-static int __init ene_init(void)
-{
-	return pnp_register_driver(&ene_driver);
-}
-
-static void ene_exit(void)
-{
-	pnp_unregister_driver(&ene_driver);
-}
-
 module_param(sample_period, int, S_IRUGO);
 MODULE_PARM_DESC(sample_period, "Hardware sample period (50 us default)");
 
@@ -1226,5 +1216,4 @@ MODULE_DESCRIPTION
 MODULE_AUTHOR("Maxim Levitsky");
 MODULE_LICENSE("GPL");
 
-module_init(ene_init);
-module_exit(ene_exit);
+module_pnp_driver(ene_driver);
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index b5167573240e..5c63c2ec6183 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -684,16 +684,6 @@ static struct pnp_driver fintek_driver = {
 	.shutdown	= fintek_shutdown,
 };
 
-static int __init fintek_init(void)
-{
-	return pnp_register_driver(&fintek_driver);
-}
-
-static void __exit fintek_exit(void)
-{
-	pnp_unregister_driver(&fintek_driver);
-}
-
 module_param(debug, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Enable debugging output");
 
@@ -703,5 +693,4 @@ MODULE_DESCRIPTION(FINTEK_DESCRIPTION " driver");
 MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
 MODULE_LICENSE("GPL");
 
-module_init(fintek_init);
-module_exit(fintek_exit);
+module_pnp_driver(fintek_driver);
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 56abf9120cc2..0f301903aa6f 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1708,21 +1708,10 @@ static struct pnp_driver ite_driver = {
 	.shutdown	= ite_shutdown,
 };
 
-static int __init ite_init(void)
-{
-	return pnp_register_driver(&ite_driver);
-}
-
-static void __exit ite_exit(void)
-{
-	pnp_unregister_driver(&ite_driver);
-}
-
 MODULE_DEVICE_TABLE(pnp, ite_ids);
 MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver");
 
 MODULE_AUTHOR("Juan J. Garcia de Soria <skandalfo@gmail.com>");
 MODULE_LICENSE("GPL");
 
-module_init(ite_init);
-module_exit(ite_exit);
+module_pnp_driver(ite_driver);
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 9c2c8635ff33..85af7a869167 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1219,16 +1219,6 @@ static struct pnp_driver nvt_driver = {
 	.shutdown	= nvt_shutdown,
 };
 
-static int __init nvt_init(void)
-{
-	return pnp_register_driver(&nvt_driver);
-}
-
-static void __exit nvt_exit(void)
-{
-	pnp_unregister_driver(&nvt_driver);
-}
-
 module_param(debug, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Enable debugging output");
 
@@ -1238,5 +1228,4 @@ MODULE_DESCRIPTION("Nuvoton W83667HG-A & W83677HG-I CIR driver");
 MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
 MODULE_LICENSE("GPL");
 
-module_init(nvt_init);
-module_exit(nvt_exit);
+module_pnp_driver(nvt_driver);
-- 
2.0.5


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

* [PATCH 6/8] pnp: net/sb1000: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
                   ` (4 preceding siblings ...)
  2015-03-16 20:46 ` [PATCH 5/8] pnp: media/rc: " Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 7/8] pnp: platform/x86/apple-gmux: " Peter Huewe
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/net/sb1000.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
index 66c2f1a01963..aad0b59d41e3 100644
--- a/drivers/net/sb1000.c
+++ b/drivers/net/sb1000.c
@@ -1175,17 +1175,4 @@ MODULE_AUTHOR("Franco Venturi <fventuri@mediaone.net>");
 MODULE_DESCRIPTION("General Instruments SB1000 driver");
 MODULE_LICENSE("GPL");
 
-static int __init
-sb1000_init(void)
-{
-	return pnp_register_driver(&sb1000_driver);
-}
-
-static void __exit
-sb1000_exit(void)
-{
-	pnp_unregister_driver(&sb1000_driver);
-}
-
-module_init(sb1000_init);
-module_exit(sb1000_exit);
+module_pnp_driver(sb1000_driver);
-- 
2.0.5


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

* [PATCH 7/8] pnp: platform/x86/apple-gmux: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
                   ` (5 preceding siblings ...)
  2015-03-16 20:46 ` [PATCH 6/8] pnp: net/sb1000: " Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-16 20:46 ` [PATCH 8/8] pnp: tty/serial/8250/8250_fintek: " Peter Huewe
  2015-03-18  1:35 ` [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Rafael J. Wysocki
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/platform/x86/apple-gmux.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index b9429fbf1cd8..66d6d22c239c 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -624,19 +624,7 @@ static struct pnp_driver gmux_pnp_driver = {
 	},
 };
 
-static int __init apple_gmux_init(void)
-{
-	return pnp_register_driver(&gmux_pnp_driver);
-}
-
-static void __exit apple_gmux_exit(void)
-{
-	pnp_unregister_driver(&gmux_pnp_driver);
-}
-
-module_init(apple_gmux_init);
-module_exit(apple_gmux_exit);
-
+module_pnp_driver(gmux_pnp_driver);
 MODULE_AUTHOR("Seth Forshee <seth.forshee@canonical.com>");
 MODULE_DESCRIPTION("Apple Gmux Driver");
 MODULE_LICENSE("GPL");
-- 
2.0.5


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

* [PATCH 8/8] pnp: tty/serial/8250/8250_fintek: Use module_pnp_driver to register driver
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
                   ` (6 preceding siblings ...)
  2015-03-16 20:46 ` [PATCH 7/8] pnp: platform/x86/apple-gmux: " Peter Huewe
@ 2015-03-16 20:46 ` Peter Huewe
  2015-03-18  1:35 ` [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Rafael J. Wysocki
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Huewe @ 2015-03-16 20:46 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, Peter Huewe

Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/tty/serial/8250/8250_fintek.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
index 1e6899bc9429..5815e81b5fc6 100644
--- a/drivers/tty/serial/8250/8250_fintek.c
+++ b/drivers/tty/serial/8250/8250_fintek.c
@@ -234,18 +234,7 @@ static struct pnp_driver fintek_8250_driver = {
 	.id_table	= fintek_dev_table,
 };
 
-static int fintek_8250_init(void)
-{
-	return pnp_register_driver(&fintek_8250_driver);
-}
-module_init(fintek_8250_init);
-
-static void fintek_8250_exit(void)
-{
-	pnp_unregister_driver(&fintek_8250_driver);
-}
-module_exit(fintek_8250_exit);
-
+module_pnp_driver(fintek_8250_driver);
 MODULE_DESCRIPTION("Fintek F812164 module");
 MODULE_AUTHOR("Ricardo Ribalda <ricardo.ribalda@gmail.com>");
 MODULE_LICENSE("GPL");
-- 
2.0.5


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

* Re: [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate
  2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
                   ` (7 preceding siblings ...)
  2015-03-16 20:46 ` [PATCH 8/8] pnp: tty/serial/8250/8250_fintek: " Peter Huewe
@ 2015-03-18  1:35 ` Rafael J. Wysocki
  8 siblings, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2015-03-18  1:35 UTC (permalink / raw)
  To: Peter Huewe; +Cc: Rafael J. Wysocki, linux-kernel, ACPI Devel Maling List

On Monday, March 16, 2015 09:46:29 PM Peter Huewe wrote:
> This patchset introduces the module_pnp_driver macro which is a
> convenience macro for PNP driver modules similar to module_pci_driver
> and convert the affected drivers to the new helper macro.
> It is intended to be used by drivers which init/exit section does nothing
> but register/unregister the PNP driver. By using this macro it is
> possible to eliminate a few lines of boilerplate code per PNP driver.
> 
> If easier you can pull directly from my tree:
> 
> The following changes since commit 06e5801b8cb3fc057d88cb4dc03c0b64b2744cda:
> 
>   Linux 4.0-rc4 (2015-03-15 17:38:20 -0700)
> 
> are available in the git repository at:
> 
>   https://github.com/PeterHuewe/linux-tpmdd.git module_pnp_driver
> 
> for you to fetch changes up to 5bf9cf2fdc9f22c7caa1c17a7eb2e17aab099b51:
> 
>   pnp: tty/serial/8250/8250_fintek: Use module_pnp_driver to register driver (2015-03-16 21:40:05 +0100)
> 
> ----------------------------------------------------------------
> 
> Peter Huewe (8):
>   pnp: Add helper macro for pnp_register_driver boilerplate
>   pnp: tpm/tpm_infineon: Use module_pnp_driver to register driver
>   pnp: ata/pata_isapnp: Use module_pnp_driver to register driver
>   pnp: ide/ide-pnp: Use module_pnp_driver to register driver
>   pnp: media/rc: Use module_pnp_driver to register driver
>   pnp: net/sb1000: Use module_pnp_driver to register driver
>   pnp: platform/x86/apple-gmux: Use module_pnp_driver to register driver
>   pnp: tty/serial/8250/8250_fintek: Use module_pnp_driver to register
>     driver

Makes sense to me.  I'll queue this up for 4.1 if there are no objections.


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2015-03-18  1:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16 20:46 [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Peter Huewe
2015-03-16 20:46 ` [PATCH 1/8] pnp: " Peter Huewe
2015-03-16 20:46 ` [PATCH 2/8] pnp: tpm/tpm_infineon: Use module_pnp_driver to register driver Peter Huewe
2015-03-16 20:46 ` [PATCH 3/8] pnp: ata/pata_isapnp: " Peter Huewe
2015-03-16 20:46 ` [PATCH 4/8] pnp: ide/ide-pnp: " Peter Huewe
2015-03-16 20:46 ` [PATCH 5/8] pnp: media/rc: " Peter Huewe
2015-03-16 20:46 ` [PATCH 6/8] pnp: net/sb1000: " Peter Huewe
2015-03-16 20:46 ` [PATCH 7/8] pnp: platform/x86/apple-gmux: " Peter Huewe
2015-03-16 20:46 ` [PATCH 8/8] pnp: tty/serial/8250/8250_fintek: " Peter Huewe
2015-03-18  1:35 ` [PATCH 0/8] Add helper macro for pnp_register_driver boilerplate Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome