lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] pinctrl: zynq: use module_platform_driver to simplify the code
On Thu, Feb 24, 2022 at 5:36 AM Srinivas Neeli
<srinivas.neeli@xilinx.com> wrote:

> module_platform_driver() makes the code simpler by eliminating
> boilerplate code.
>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>

Nice, patch applied!

> -static int __init zynq_pinctrl_init(void)
> -{
> - return platform_driver_register(&zynq_pinctrl_driver);
> -}
> -arch_initcall(zynq_pinctrl_init);
> +module_platform_driver(zynq_pinctrl_driver);

This will incidentally also move the initcall from arch_initcall
to driver_initcall but I assume that works so, OK.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2022-03-15 01:48    [W:0.125 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site