* [PATCH mtd/next 0/8] Introduces the module_mtd_blktrans macro
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
This patchset introduces the module_mtd_blktrans macro which is a
convenience macro for mtd blktrans modules similar to
module_platform_driver. It is intended to be used by drivers which
init/exit section does nothing but register/unregister the mtd
blktrans driver. By using this macro it is possible to eliminate a
few lines of boilerplate code per mtd blktrans driver.
Dejin Zheng (8):
mtd: Add helper macro for register_mtd_blktrans boilerplate
mtd: ftl: Use module_mtd_blktrans to register driver
mtd: inftlcore: Use module_mtd_blktrans to register driver
mtd: mtdblock: Use module_mtd_blktrans to register driver
mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
mtd: mtdswap: Use module_mtd_blktrans to register driver
mtd: nftlcore: Use module_mtd_blktrans to register driver
mtd: rfd_ftl: Use module_mtd_blktrans to register driver
drivers/mtd/ftl.c | 14 +-------------
drivers/mtd/inftlcore.c | 13 +------------
drivers/mtd/mtdblock.c | 14 +-------------
drivers/mtd/mtdblock_ro.c | 13 +------------
drivers/mtd/mtdswap.c | 14 +-------------
drivers/mtd/nftlcore.c | 13 +------------
drivers/mtd/rfd_ftl.c | 13 +------------
include/linux/mtd/blktrans.h | 11 +++++++++++
8 files changed, 18 insertions(+), 87 deletions(-)
--
2.25.0
^ permalink raw reply [flat|nested] 34+ messages in thread
* [PATCH mtd/next 0/8] Introduces the module_mtd_blktrans macro
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
This patchset introduces the module_mtd_blktrans macro which is a
convenience macro for mtd blktrans modules similar to
module_platform_driver. It is intended to be used by drivers which
init/exit section does nothing but register/unregister the mtd
blktrans driver. By using this macro it is possible to eliminate a
few lines of boilerplate code per mtd blktrans driver.
Dejin Zheng (8):
mtd: Add helper macro for register_mtd_blktrans boilerplate
mtd: ftl: Use module_mtd_blktrans to register driver
mtd: inftlcore: Use module_mtd_blktrans to register driver
mtd: mtdblock: Use module_mtd_blktrans to register driver
mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
mtd: mtdswap: Use module_mtd_blktrans to register driver
mtd: nftlcore: Use module_mtd_blktrans to register driver
mtd: rfd_ftl: Use module_mtd_blktrans to register driver
drivers/mtd/ftl.c | 14 +-------------
drivers/mtd/inftlcore.c | 13 +------------
drivers/mtd/mtdblock.c | 14 +-------------
drivers/mtd/mtdblock_ro.c | 13 +------------
drivers/mtd/mtdswap.c | 14 +-------------
drivers/mtd/nftlcore.c | 13 +------------
drivers/mtd/rfd_ftl.c | 13 +------------
include/linux/mtd/blktrans.h | 11 +++++++++++
8 files changed, 18 insertions(+), 87 deletions(-)
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* [PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
This patch introduces the module_mtd_blktrans macro which is a convenience
macro for mtd blktrans modules similar to module_platform_driver.
It is intended to be used by drivers which init/exit section does nothing
but register/unregister the mtd blktrans driver. By using this macro it is
possible to eliminate a few lines of boilerplate code per mtd blktrans
driver.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
include/linux/mtd/blktrans.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h
index 3c668cb1e344..15cc9b95e32b 100644
--- a/include/linux/mtd/blktrans.h
+++ b/include/linux/mtd/blktrans.h
@@ -77,5 +77,16 @@ extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev);
+/**
+ * module_mtd_blktrans() - Helper macro for registering a mtd blktrans driver
+ * @__mtd_blktrans: mtd_blktrans_ops struct
+ *
+ * Helper macro for mtd blktrans 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_mtd_blktrans(__mtd_blktrans) \
+ module_driver(__mtd_blktrans, register_mtd_blktrans, \
+ deregister_mtd_blktrans)
#endif /* __MTD_TRANS_H__ */
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
This patch introduces the module_mtd_blktrans macro which is a convenience
macro for mtd blktrans modules similar to module_platform_driver.
It is intended to be used by drivers which init/exit section does nothing
but register/unregister the mtd blktrans driver. By using this macro it is
possible to eliminate a few lines of boilerplate code per mtd blktrans
driver.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
include/linux/mtd/blktrans.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h
index 3c668cb1e344..15cc9b95e32b 100644
--- a/include/linux/mtd/blktrans.h
+++ b/include/linux/mtd/blktrans.h
@@ -77,5 +77,16 @@ extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev);
+/**
+ * module_mtd_blktrans() - Helper macro for registering a mtd blktrans driver
+ * @__mtd_blktrans: mtd_blktrans_ops struct
+ *
+ * Helper macro for mtd blktrans 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_mtd_blktrans(__mtd_blktrans) \
+ module_driver(__mtd_blktrans, register_mtd_blktrans, \
+ deregister_mtd_blktrans)
#endif /* __MTD_TRANS_H__ */
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/ftl.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 2578f27914ef..9b33c082179d 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -1056,19 +1056,7 @@ static struct mtd_blktrans_ops ftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_ftl(void)
-{
- return register_mtd_blktrans(&ftl_tr);
-}
-
-static void __exit cleanup_ftl(void)
-{
- deregister_mtd_blktrans(&ftl_tr);
-}
-
-module_init(init_ftl);
-module_exit(cleanup_ftl);
-
+module_mtd_blktrans(ftl_tr);
MODULE_LICENSE("Dual MPL/GPL");
MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/ftl.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 2578f27914ef..9b33c082179d 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -1056,19 +1056,7 @@ static struct mtd_blktrans_ops ftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_ftl(void)
-{
- return register_mtd_blktrans(&ftl_tr);
-}
-
-static void __exit cleanup_ftl(void)
-{
- deregister_mtd_blktrans(&ftl_tr);
-}
-
-module_init(init_ftl);
-module_exit(cleanup_ftl);
-
+module_mtd_blktrans(ftl_tr);
MODULE_LICENSE("Dual MPL/GPL");
MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 3/8] mtd: inftlcore: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/inftlcore.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index a0d6c00e7b85..6b48397c750c 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -937,18 +937,7 @@ static struct mtd_blktrans_ops inftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_inftl(void)
-{
- return register_mtd_blktrans(&inftl_tr);
-}
-
-static void __exit cleanup_inftl(void)
-{
- deregister_mtd_blktrans(&inftl_tr);
-}
-
-module_init(init_inftl);
-module_exit(cleanup_inftl);
+module_mtd_blktrans(inftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>, David Woodhouse <dwmw2@infradead.org>, Fabrice Bellard <fabrice.bellard@netgem.com> et al.");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 3/8] mtd: inftlcore: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/inftlcore.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index a0d6c00e7b85..6b48397c750c 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -937,18 +937,7 @@ static struct mtd_blktrans_ops inftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_inftl(void)
-{
- return register_mtd_blktrans(&inftl_tr);
-}
-
-static void __exit cleanup_inftl(void)
-{
- deregister_mtd_blktrans(&inftl_tr);
-}
-
-module_init(init_inftl);
-module_exit(cleanup_inftl);
+module_mtd_blktrans(inftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>, David Woodhouse <dwmw2@infradead.org>, Fabrice Bellard <fabrice.bellard@netgem.com> et al.");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 4/8] mtd: mtdblock: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/mtdblock.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 32e52d83b961..a80809543793 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -346,19 +346,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
.owner = THIS_MODULE,
};
-static int __init init_mtdblock(void)
-{
- return register_mtd_blktrans(&mtdblock_tr);
-}
-
-static void __exit cleanup_mtdblock(void)
-{
- deregister_mtd_blktrans(&mtdblock_tr);
-}
-
-module_init(init_mtdblock);
-module_exit(cleanup_mtdblock);
-
+module_mtd_blktrans(mtdblock_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Nicolas Pitre <nico@fluxnic.net> et al.");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 4/8] mtd: mtdblock: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/mtdblock.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 32e52d83b961..a80809543793 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -346,19 +346,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
.owner = THIS_MODULE,
};
-static int __init init_mtdblock(void)
-{
- return register_mtd_blktrans(&mtdblock_tr);
-}
-
-static void __exit cleanup_mtdblock(void)
-{
- deregister_mtd_blktrans(&mtdblock_tr);
-}
-
-module_init(init_mtdblock);
-module_exit(cleanup_mtdblock);
-
+module_mtd_blktrans(mtdblock_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Nicolas Pitre <nico@fluxnic.net> et al.");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 5/8] mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/mtdblock_ro.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
index 7fcf29ef2bdc..d92914f73d52 100644
--- a/drivers/mtd/mtdblock_ro.c
+++ b/drivers/mtd/mtdblock_ro.c
@@ -67,18 +67,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
.owner = THIS_MODULE,
};
-static int __init mtdblock_init(void)
-{
- return register_mtd_blktrans(&mtdblock_tr);
-}
-
-static void __exit mtdblock_exit(void)
-{
- deregister_mtd_blktrans(&mtdblock_tr);
-}
-
-module_init(mtdblock_init);
-module_exit(mtdblock_exit);
+module_mtd_blktrans(mtdblock_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 5/8] mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/mtdblock_ro.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
index 7fcf29ef2bdc..d92914f73d52 100644
--- a/drivers/mtd/mtdblock_ro.c
+++ b/drivers/mtd/mtdblock_ro.c
@@ -67,18 +67,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
.owner = THIS_MODULE,
};
-static int __init mtdblock_init(void)
-{
- return register_mtd_blktrans(&mtdblock_tr);
-}
-
-static void __exit mtdblock_exit(void)
-{
- deregister_mtd_blktrans(&mtdblock_tr);
-}
-
-module_init(mtdblock_init);
-module_exit(mtdblock_exit);
+module_mtd_blktrans(mtdblock_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 6/8] mtd: mtdswap: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/mtdswap.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index 795dec4483c2..7e309270ddd4 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1484,19 +1484,7 @@ static struct mtd_blktrans_ops mtdswap_ops = {
.owner = THIS_MODULE,
};
-static int __init mtdswap_modinit(void)
-{
- return register_mtd_blktrans(&mtdswap_ops);
-}
-
-static void __exit mtdswap_modexit(void)
-{
- deregister_mtd_blktrans(&mtdswap_ops);
-}
-
-module_init(mtdswap_modinit);
-module_exit(mtdswap_modexit);
-
+module_mtd_blktrans(mtdswap_ops);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@nokia.com>");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 6/8] mtd: mtdswap: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/mtdswap.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index 795dec4483c2..7e309270ddd4 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1484,19 +1484,7 @@ static struct mtd_blktrans_ops mtdswap_ops = {
.owner = THIS_MODULE,
};
-static int __init mtdswap_modinit(void)
-{
- return register_mtd_blktrans(&mtdswap_ops);
-}
-
-static void __exit mtdswap_modexit(void)
-{
- deregister_mtd_blktrans(&mtdswap_ops);
-}
-
-module_init(mtdswap_modinit);
-module_exit(mtdswap_modexit);
-
+module_mtd_blktrans(mtdswap_ops);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@nokia.com>");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 7/8] mtd: nftlcore: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:45 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/nftlcore.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index d44641129cdb..bcd0094f172d 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -797,18 +797,7 @@ static struct mtd_blktrans_ops nftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_nftl(void)
-{
- return register_mtd_blktrans(&nftl_tr);
-}
-
-static void __exit cleanup_nftl(void)
-{
- deregister_mtd_blktrans(&nftl_tr);
-}
-
-module_init(init_nftl);
-module_exit(cleanup_nftl);
+module_mtd_blktrans(nftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>, Fabrice Bellard <fabrice.bellard@netgem.com> et al.");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 7/8] mtd: nftlcore: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:45 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:45 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/nftlcore.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index d44641129cdb..bcd0094f172d 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -797,18 +797,7 @@ static struct mtd_blktrans_ops nftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_nftl(void)
-{
- return register_mtd_blktrans(&nftl_tr);
-}
-
-static void __exit cleanup_nftl(void)
-{
- deregister_mtd_blktrans(&nftl_tr);
-}
-
-module_init(init_nftl);
-module_exit(cleanup_nftl);
+module_mtd_blktrans(nftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>, Fabrice Bellard <fabrice.bellard@netgem.com> et al.");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 8/8] mtd: rfd_ftl: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-02-13 16:46 ` Dejin Zheng
-1 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:46 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel, Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/rfd_ftl.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index 3d1df82fa105..cce3bf6f99b4 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -794,18 +794,7 @@ static struct mtd_blktrans_ops rfd_ftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_rfd_ftl(void)
-{
- return register_mtd_blktrans(&rfd_ftl_tr);
-}
-
-static void __exit cleanup_rfd_ftl(void)
-{
- deregister_mtd_blktrans(&rfd_ftl_tr);
-}
-
-module_init(init_rfd_ftl);
-module_exit(cleanup_rfd_ftl);
+module_mtd_blktrans(rfd_ftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sean Young <sean@mess.org>");
--
2.25.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH mtd/next 8/8] mtd: rfd_ftl: Use module_mtd_blktrans to register driver
@ 2021-02-13 16:46 ` Dejin Zheng
0 siblings, 0 replies; 34+ messages in thread
From: Dejin Zheng @ 2021-02-13 16:46 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, nixiaoming
Cc: Dejin Zheng, linux-mtd, linux-kernel
Removing some boilerplate by using module_mtd_blktrans instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/mtd/rfd_ftl.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index 3d1df82fa105..cce3bf6f99b4 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -794,18 +794,7 @@ static struct mtd_blktrans_ops rfd_ftl_tr = {
.owner = THIS_MODULE,
};
-static int __init init_rfd_ftl(void)
-{
- return register_mtd_blktrans(&rfd_ftl_tr);
-}
-
-static void __exit cleanup_rfd_ftl(void)
-{
- deregister_mtd_blktrans(&rfd_ftl_tr);
-}
-
-module_init(init_rfd_ftl);
-module_exit(cleanup_rfd_ftl);
+module_mtd_blktrans(rfd_ftl_tr);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sean Young <sean@mess.org>");
--
2.25.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 8/8] mtd: rfd_ftl: Use module_mtd_blktrans to register driver
2021-02-13 16:46 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:46:00 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 8/8] mtd: rfd_ftl: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:46:00 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 7/8] mtd: nftlcore: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:59 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 7/8] mtd: nftlcore: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:59 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 6/8] mtd: mtdswap: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:58 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 6/8] mtd: mtdswap: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:58 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 5/8] mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:57 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 5/8] mtd: mtdblock_ro: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:57 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 4/8] mtd: mtdblock: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:56 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 4/8] mtd: mtdblock: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:56 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 3/8] mtd: inftlcore: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:55 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 3/8] mtd: inftlcore: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:55 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:54 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:54 UTC, Dejin Zheng wrote:
> Removing some boilerplate by using module_mtd_blktrans instead of calling
> register and unregister in the otherwise empty init/exit functions.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate
2021-02-13 16:45 ` Dejin Zheng
@ 2021-03-02 17:14 ` Miquel Raynal
-1 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:53 UTC, Dejin Zheng wrote:
> This patch introduces the module_mtd_blktrans macro which is a convenience
> macro for mtd blktrans modules similar to module_platform_driver.
> It is intended to be used by drivers which init/exit section does nothing
> but register/unregister the mtd blktrans driver. By using this macro it is
> possible to eliminate a few lines of boilerplate code per mtd blktrans
> driver.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate
@ 2021-03-02 17:14 ` Miquel Raynal
0 siblings, 0 replies; 34+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
To: Dejin Zheng, miquel.raynal, richard, vigneshr, nixiaoming
Cc: linux-mtd, linux-kernel
On Sat, 2021-02-13 at 16:45:53 UTC, Dejin Zheng wrote:
> This patch introduces the module_mtd_blktrans macro which is a convenience
> macro for mtd blktrans modules similar to module_platform_driver.
> It is intended to be used by drivers which init/exit section does nothing
> but register/unregister the mtd blktrans driver. By using this macro it is
> possible to eliminate a few lines of boilerplate code per mtd blktrans
> driver.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2021-03-03 22:02 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-13 16:45 [PATCH mtd/next 0/8] Introduces the module_mtd_blktrans macro Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-02-13 16:45 ` [PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:45 ` [PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:45 ` [PATCH mtd/next 3/8] mtd: inftlcore: " Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:45 ` [PATCH mtd/next 4/8] mtd: mtdblock: " Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:45 ` [PATCH mtd/next 5/8] mtd: mtdblock_ro: " Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:45 ` [PATCH mtd/next 6/8] mtd: mtdswap: " Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:45 ` [PATCH mtd/next 7/8] mtd: nftlcore: " Dejin Zheng
2021-02-13 16:45 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
2021-02-13 16:46 ` [PATCH mtd/next 8/8] mtd: rfd_ftl: " Dejin Zheng
2021-02-13 16:46 ` Dejin Zheng
2021-03-02 17:14 ` Miquel Raynal
2021-03-02 17:14 ` Miquel Raynal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.