PCI: pciehp: create files only for existing capabilities
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Mon, 5 Oct 2009 08:41:37 +0000 (17:41 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 4 Nov 2009 17:01:44 +0000 (09:01 -0800)
commit586f1d6688c68a6c7fa4e6a00fa3968b16daef75
tree08777d2d739a940dac83df927389323f56569ee2
parent3c3a1b1759616e6603027108f8abcbec54271e62
PCI: pciehp: create files only for existing capabilities

Current pciehp driver creates 'attention' and 'latch' files even if
the controller doesn't support them. In this case, the contents of
those files are meaningless and unpredictable. Those files should be
created only if the controller has the corresponding capabilities.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/hotplug/pciehp_core.c