netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Alexandru Tachici <alexandru.tachici@analog.com>
Cc: linux-kernel@vger.kernel.org, andrew@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org, lennart@lfdomain.com
Subject: Re: [net v2 1/1] net: ethernet: adi: adin1110: Fix notifiers
Date: Thu, 20 Oct 2022 12:28:13 +0100	[thread overview]
Message-ID: <Y1EwzRa3SNpA0++W@shell.armlinux.org.uk> (raw)
In-Reply-To: <20221020094804.13527-2-alexandru.tachici@analog.com>

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!

  reply	other threads:[~2022-10-20 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  9:48 [net v2 0/1] net: ethernet: adi: adin1110: Fix notifiers Alexandru Tachici
2022-10-20  9:48 ` [net v2 1/1] " Alexandru Tachici
2022-10-20 11:28   ` Russell King (Oracle) [this message]
2022-10-20 13:08     ` Alexandru Tachici

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1EwzRa3SNpA0++W@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandru.tachici@analog.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lennart@lfdomain.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).