mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: lkml <linux-kernel@vger.kernel.org>, gregkh <greg@kroah.com>,
	akpm <akpm@osdl.org>,
	davej@codemonkey.org.uk
Subject: Re: [PATCH] PCIE: create sysfs directory on first use
Date: Fri, 07 Jul 2006 20:07:51 -0400	[thread overview]
Message-ID: <200607080007.k6807p9q007430@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Fri, 07 Jul 2006 16:52:38 PDT." <20060707165238.337c7a4a.rdunlap@xenotime.net>

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

On Fri, 07 Jul 2006 16:52:38 PDT, "Randy.Dunlap" said:

> @@ -405,11 +410,15 @@ void pcie_port_device_remove(struct pci_
>  void pcie_port_bus_register(void)
>  {
>  	bus_register(&pcie_port_bus_type);
> +	pcie_dev_registered = 1;

Shouldn't this be 'pcie_dev_registered++;'
>  }
>  
>  void pcie_port_bus_unregister(void)
>  {
> -	bus_unregister(&pcie_port_bus_type);
> +	if (pcie_dev_registered) {
> +		bus_unregister(&pcie_port_bus_type);
> +		pcie_dev_registered = 0;

and 'pciedev_registered--;'

> +	}
>  }

to keep it from blowing up if 2 bus get registered, then one de-registered,
and then re-registered again? I could see this happening in a hotplug design?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  reply	other threads:[~2006-07-08  0:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07 23:52 Randy.Dunlap
2006-07-08  0:07 ` Valdis.Kletnieks [this message]
2006-07-08  0:10 ` Andrew Morton
2006-07-08  0:17   ` Randy.Dunlap
2006-07-09  5:58   ` [PATCH] PCIE: check and return bus_register errors Randy.Dunlap

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=200607080007.k6807p9q007430@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=akpm@osdl.org \
    --cc=davej@codemonkey.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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

all inboxes | Powered by JetHome®