[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1EwzRa3SNpA0++W@shell.armlinux.org.uk>
Date: Thu, 20 Oct 2022 12:28:13 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Alexandru Tachici <alexandru.tachici@...log.com>
Cc: linux-kernel@...r.kernel.org, andrew@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, lennart@...omain.com
Subject: Re: [net v2 1/1] net: ethernet: adi: adin1110: Fix notifiers
Hi,
On Thu, Oct 20, 2022 at 12:48:04PM +0300, Alexandru Tachici wrote:
> @@ -1688,7 +1684,31 @@ static struct spi_driver adin1110_driver = {
> .probe = adin1110_probe,
> .id_table = adin1110_spi_id,
> };
> -module_spi_driver(adin1110_driver);
> +
> +static int __init adin1110_driver_init(void)
> +{
> + int err;
> +
> + err = spi_register_driver(&adin1110_driver);
> + if (err)
> + return err;
This is the point that devices can be bound and thus published to
userspace.
> +
> + err = adin1110_setup_notifiers();
> + if (err) {
> + spi_unregister_driver(&adin1110_driver);
> + return err;
> + }
And you setup the notifier after, so there is a window when
notifications could be lost. Is this safe?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists