diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-07-26 23:06:46 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-08-07 13:36:27 -0400 |
commit | 94f81a47c4a7a2d7a16fcfdd6d81da381732c101 (patch) | |
tree | 79bf6bfaa9f53127bacde65233b47c959fddfbee /drivers | |
parent | d25f14389a65c7f95512b01415d8d4a8d62855ab (diff) |
PCI hotplug: SGI hotplug: do not use hotplug_slot_attr
By the pci slot changes, callbacks of attributes under slot directory
(/sys/bus/pci/slots) had been changed to get the pointer to struct
pci_slot instead of struct hotplug_slot. So the path_show() that
assumes the parameter is a pointer to struct hotplug_slot seems
broken.
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')
-rw-r--r-- | drivers/pci/hotplug/sgi_hotplug.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index 0a724bb6ba10..8aebe1e9d3d6 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -90,11 +90,10 @@ static struct hotplug_slot_ops sn_hotplug_slot_ops = { | |||
90 | 90 | ||
91 | static DEFINE_MUTEX(sn_hotplug_mutex); | 91 | static DEFINE_MUTEX(sn_hotplug_mutex); |
92 | 92 | ||
93 | static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot, | 93 | static ssize_t path_show(struct pci_slot *pci_slot, char *buf) |
94 | char *buf) | ||
95 | { | 94 | { |
96 | int retval = -ENOENT; | 95 | int retval = -ENOENT; |
97 | struct slot *slot = bss_hotplug_slot->private; | 96 | struct slot *slot = pci_slot->hotplug->private; |
98 | 97 | ||
99 | if (!slot) | 98 | if (!slot) |
100 | return retval; | 99 | return retval; |
@@ -103,13 +102,7 @@ static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot, | |||
103 | return retval; | 102 | return retval; |
104 | } | 103 | } |
105 | 104 | ||
106 | struct hotplug_slot_attribute { | 105 | static struct pci_slot_attribute sn_slot_path_attr = __ATTR_RO(path); |
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 | |||
112 | static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path); | ||
113 | 106 | ||
114 | static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) | 107 | static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) |
115 | { | 108 | { |