lkml.org 
[lkml]   [2023]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 17/20] nvmem: layouts: sl28vpd: Add new layout driver
From


On 08/03/2023 15:31, Miquel Raynal wrote:
> +
> +static int __init sl28vpd_init(void)
> +{
> + return nvmem_layout_register(&sl28vpd_layout);
> +}
> +
> +static void __exit sl28vpd_exit(void)
> +{
> + nvmem_layout_unregister(&sl28vpd_layout);
> +}
> +
> +module_init(sl28vpd_init);
> +module_exit(sl28vpd_exit);
Looking at this pattern in two drivers, we could come up with some
helper macro like.

#define module_nvmem_layout_driver(__layout_driver) \
module_driver(__layout_driver, nvmem_layout_register, \
nvmem_layout_unregister)


--srini

\
 
 \ /
  Last update: 2023-03-27 00:53    [W:0.154 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site