diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-07-26 23:05:38 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-08-07 13:36:26 -0400 |
commit | d25f14389a65c7f95512b01415d8d4a8d62855ab (patch) | |
tree | 45565d54d8ab34a7065405c651b17ae4552dc7d0 /drivers/pci/hotplug | |
parent | 90bc1a658a53f8832ee799685703977a450e5af9 (diff) |
PCI hotplug: SGI hotplug: fix build failure
The commit bd3d99c17039fd05a29587db3f4a180c48da115a ("PCI: Remove
untested Electromechanical Interlock (EMI) support in pciehp."), which
removes the definition of "struct hotplug_slot_attr", broke SGI
hotplug driver. By this commit, we get the following compile error.
drivers/pci/hotplug/sgi_hotplug.c:106: error: variable 'sn_slot_path_attr' has initializer but incomplete type
drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'attr' specified in initializer
drivers/pci/hotplug/sgi_hotplug.c:106: error: extra brace group at end of initializer
drivers/pci/hotplug/sgi_hotplug.c:106: error: (near initialization for 'sn_slot_path_attr')
drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in struct initializer
drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization for 'sn_slot_path_attr')
drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'show' specified in initializer
drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in struct initializer
drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization for 'sn_slot_path_attr')
drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hp_destroy':
drivers/pci/hotplug/sgi_hotplug.c:203: error: invalid use of undefined type 'struct hotplug_slot_attribute'
drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hotplug_slot_register':
drivers/pci/hotplug/sgi_hotplug.c:655: error: invalid use of undefined type 'struct hotplug_slot_attribute'
This patch fixes this regression by adding the definition of struct
hotplug_slot_attr into sgi_hotplug.c.
Tested-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/sgi_hotplug.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index a4494d78e7c2..0a724bb6ba10 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -103,6 +103,12 @@ static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot, | |||
103 | return retval; | 103 | return retval; |
104 | } | 104 | } |
105 | 105 | ||
106 | struct hotplug_slot_attribute { | ||
107 | struct attribute attr; | ||
108 | ssize_t (*show)(struct hotplug_slot *, char *); | ||
109 | ssize_t (*store)(struct hotplug_slot *, const char *, size_t); | ||
110 | }; | ||
111 | |||
106 | static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path); | 112 | static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path); |
107 | 113 | ||
108 | static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) | 114 | static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) |