diff options
author | Yinghai Lu <yinghai@kernel.org> | 2011-05-13 00:11:39 (GMT) |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-05-21 19:17:12 (GMT) |
commit | b9d320fcb6259baffaeaf93a5fce252cd09333d6 (patch) | |
tree | c5372d704719ff2c6f7b8d2b6bb3c04901cde242 /drivers/pci/pci.h | |
parent | da7822e5ad71ec9b745b412639f1e5e0ba795a20 (diff) | |
download | linux-b9d320fcb6259baffaeaf93a5fce252cd09333d6.tar.xz |
PCI: add rescan to /sys/.../pci_bus/.../
After remove the device from /sys, we have to rescan all or
find out the bridge and access /sys../device/rescan there.
this patch add /sys/.../pci_bus/.../rescan. So user can rescan more easy.
that is more clean and easy to understand.
like after remove 0000:c4:00.0, you can rescan 0000:c4 directly.
-v2: According to Jesse, use function instead of exposing attr, so could hide
#ifdef in header file.
also add code to remove rescan file in remove path.
-v3: GregKH pointed out that we should use dev_attrs to avoid racing.
So add pcibus_attrs and make it to be member of pcibus_attrs.
-v4: Change name to pcibus_dev_attrs according to GregKH
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a6ec200..dcf640a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -156,6 +156,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev) } extern struct device_attribute pci_dev_attrs[]; +extern struct device_attribute pcibus_dev_attrs[]; extern struct device_attribute dev_attr_cpuaffinity; extern struct device_attribute dev_attr_cpulistaffinity; #ifdef CONFIG_HOTPLUG |