diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-04-04 20:21:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-05 20:41:13 +0300 |
commit | d119eb38faab61125aaa4f63c74eef61585cf34c (patch) | |
tree | bf668c43116b6acc7c2bbc5bff0a595be12f2b32 /drivers/nvmem | |
parent | 0abdf99fe0c86252ba274703425f8d543d7e7f0d (diff) | |
download | linux-d119eb38faab61125aaa4f63c74eef61585cf34c.tar.xz |
nvmem: layouts: onie-tlv: Use module_nvmem_layout_driver()
Stop open-coding the module init/exit functions. Use the
module_nvmem_layout_driver() instead.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230404172148.82422-39-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/layouts/onie-tlv.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/nvmem/layouts/onie-tlv.c b/drivers/nvmem/layouts/onie-tlv.c index d45b7301a69d..661093de33b4 100644 --- a/drivers/nvmem/layouts/onie-tlv.c +++ b/drivers/nvmem/layouts/onie-tlv.c @@ -237,19 +237,7 @@ static struct nvmem_layout onie_tlv_layout = { .of_match_table = onie_tlv_of_match_table, .add_cells = onie_tlv_parse_table, }; - -static int __init onie_tlv_init(void) -{ - return nvmem_layout_register(&onie_tlv_layout); -} - -static void __exit onie_tlv_exit(void) -{ - nvmem_layout_unregister(&onie_tlv_layout); -} - -module_init(onie_tlv_init); -module_exit(onie_tlv_exit); +module_nvmem_layout_driver(onie_tlv_layout); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Miquel Raynal <miquel.raynal@bootlin.com>"); |