• Kenji Kaneshige's avatar
    PCI hotplug: SGI hotplug: fix build failure · d25f1438
    Kenji Kaneshige authored
    The commit bd3d99c1 ("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: default avatarMike Habeck <habeck@sgi.com>
    Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    d25f1438
sgi_hotplug.c 18.3 KB