Re: [PATCH 09/11] pci: pci_bridge_release_res

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

 



> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -731,32 +732,57 @@ static void pci_bridge_release_resources(struct pci_bus *bus,
>  	unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM |
>  				  IORESOURCE_PREFETCH;
>  
> +	/* The root bus? */
> +	if (!bus->self)
> +		return;
> +

pci_is_root_bus()

> +/*
> + * pci_bridge_release_res will not release the resource that have children
> + *  and apply all resources type under that devices
> + */
> +void pci_bridge_release_res(struct pci_bus *bus)
> +{
> +	unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM |
> +				  IORESOURCE_PREFETCH;
> +
> +	__pci_bridge_release_res(bus, false, type_mask);
> +}
> +EXPORT_SYMBOL_GPL(pci_bridge_release_res);
> +
> +/*
> + * this one will release children resource, but only to specifed resource type
> + * and also will keep old resource size
> + */
> +static void pci_bridge_release_resources(struct pci_bus *bus,
> +					  unsigned long type)
> +{
> +	__pci_bridge_release_res(bus, true, type);
> +}
> +

I still don't really like the naming here. We're exporting a
function with an abbreviation in the name while the static
function has a name that is more descriptive.

/ac
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux