RE: [EXT] Re: [RESEND PATCH] gpio: vf610: Allow building as a module
From: Jindong Yue
Date: Wed Apr 16 2025 - 02:31:57 EST
> -----Original Message-----
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Sent: Wednesday, April 16, 2025 5:46 AM
> To: Jindong Yue <jindong.yue@xxxxxxx>
> Cc: brgl@xxxxxxxx; linux-gpio@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [EXT] Re: [RESEND PATCH] gpio: vf610: Allow building as a module
>
>
>
> On Tue, Apr 8, 2025 at 5:15 PM Jindong Yue <jindong.yue@xxxxxxx> wrote:
>
> > Support for building it as a module for use on the Android platform,
> > because the Android kernel(GKI) doesn't contain board-specific
> > drivers, it requires that these drivers be built as a module and
> > loaded into the system.
> >
> > Signed-off-by: Jindong Yue <jindong.yue@xxxxxxx>
> (...)
>
> > builtin_platform_driver(vf610_gpio_driver);
> > +MODULE_DESCRIPTION("VF610 GPIO driver"); MODULE_LICENSE("GPL");
>
> You compile a builtin_platform_driver() and then claim this is a module?
>
> Switch the builtin_platform_driver() to module_platform_driver().
>
> (Also make sure that removing the module actually works, please.)
>
Thanks for your review. I just sent patch v2 to use module_platform_driver().
I also verified that with this change, the module can be removed and reinstalled on the running system.
BRs,
Jindong