lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALHNRZ9=u9hrXZ79N3VzMwdFuJO75TomOzRzgDxzmcTEeatzAQ@mail.gmail.com>
Date: Mon, 30 Jun 2025 14:33:07 -0500
From: Aaron Kling <webgeek1234@...il.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Laxman Dewangan <ldewangan@...dia.com>, Linus Walleij <linus.walleij@...aro.org>, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] gpio: palmas: Allow building as a module

On Mon, Jun 2, 2025 at 4:48 AM Bartosz Golaszewski <brgl@...ev.pl> wrote:
>
> On Fri, May 23, 2025 at 12:22 AM Aaron Kling via B4 Relay
> <devnull+webgeek1234.gmail.com@...nel.org> wrote:
> >
> > From: Aaron Kling <webgeek1234@...il.com>
> >
> > The driver works fine as a module, so allowing building as such. This
> > drops the driver specific init in favor of the module macro which does
> > the same, plus handling exit.
> >
> > Signed-off-by: Aaron Kling <webgeek1234@...il.com>
> > ---
> > Changes in v2:
> > - Drop module alias and add module device table
> > - Link to v1: https://lore.kernel.org/r/20250522-gpio-palmas-gpio-v1-1-d6b1a3776ef5@gmail.com
> > ---
> >  drivers/gpio/Kconfig       |  2 +-
> >  drivers/gpio/gpio-palmas.c | 10 +++++-----
> >  2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index f2c39bbff83a33dcb12b2d32aa3ebc358a0dd949..be5d823516d0e2bff4b4231dac6a82bf10887118 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -1464,7 +1464,7 @@ config GPIO_MAX77650
> >           These chips have a single pin that can be configured as GPIO.
> >
> >  config GPIO_PALMAS
> > -       bool "TI PALMAS series PMICs GPIO"
> > +       tristate "TI PALMAS series PMICs GPIO"
> >         depends on MFD_PALMAS
> >         help
> >           Select this option to enable GPIO driver for the TI PALMAS
> > diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
> > index 28dba7048509a3ef9c7972c1be53ea30adddabb0..eaef29f59292de5281f31e196961d90974e65b75 100644
> > --- a/drivers/gpio/gpio-palmas.c
> > +++ b/drivers/gpio/gpio-palmas.c
> > @@ -140,6 +140,7 @@ static const struct of_device_id of_palmas_gpio_match[] = {
> >         { .compatible = "ti,tps80036-gpio", .data = &tps80036_dev_data,},
> >         { },
> >  };
> > +MODULE_DEVICE_TABLE(of, of_palmas_gpio_match);
> >
> >  static int palmas_gpio_probe(struct platform_device *pdev)
> >  {
> > @@ -191,9 +192,8 @@ static struct platform_driver palmas_gpio_driver = {
> >         .driver.of_match_table = of_palmas_gpio_match,
> >         .probe          = palmas_gpio_probe,
> >  };
> > +module_platform_driver(palmas_gpio_driver);
> >
> > -static int __init palmas_gpio_init(void)
> > -{
> > -       return platform_driver_register(&palmas_gpio_driver);
> > -}
> > -subsys_initcall(palmas_gpio_init);
>
> This being put into an earlier initcall than device_initcall() makes
> me think, someone had a reason for it and this change can break this.
> I'm Cc'ing the original author who seems to still be active in the
> kernel.
>
> Laxman: can you verify that this can be safely moved to module_initcall()?
>

Reminder about this patch/question. It's well into the 6.16 cycle now.
If Laxman doesn't respond, is this mergeable? I didn't see any issues
in my basic boot tests on a tegra124 device using a tps65913. But I
didn't do anything close to full functionality tests.

Aaron

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ