[PATCH 1/8 net-next] irda: sir-dev: add module_sirdev_driver() helper
From: Fabian Frederick
Date: Wed Jul 13 2016 - 14:30:17 EST
Based on module_driver() to avoid generic functions.
See include/linux/device.h/module_driver comments for
further details.
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
drivers/net/irda/sir-dev.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/irda/sir-dev.h b/drivers/net/irda/sir-dev.h
index f50b9c1..894c781 100644
--- a/drivers/net/irda/sir-dev.h
+++ b/drivers/net/irda/sir-dev.h
@@ -99,6 +99,13 @@ struct sir_driver {
int (*stop_dev)(struct sir_dev *dev);
};
+/* module_sirdev_driver() - Helper macro for drivers that don't do
+ * anything special in module init/exit.
+ * See include/linux/device.h for further details.
+ */
+#define module_sirdev_driver(__sirdev_driver) \
+ module_driver(__sirdev_driver, irda_register_dongle, \
+ irda_unregister_dongle)
/* exported */
--
2.8.1