lkml.org 
[lkml]   [2022]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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!

\
 
 \ /
  Last update: 2022-10-20 13:28    [W:0.105 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site