Re: [PATCH] PCIE: create sysfs directory on first use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgp5ZKpGc7T1A.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux