mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 01:08:50 +00:00
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>
This commit is contained in:
parent
d25f14389a
commit
94f81a47c4
@ -90,11 +90,10 @@ static struct hotplug_slot_ops sn_hotplug_slot_ops = {
|
|||||||
|
|
||||||
static DEFINE_MUTEX(sn_hotplug_mutex);
|
static DEFINE_MUTEX(sn_hotplug_mutex);
|
||||||
|
|
||||||
static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
|
static ssize_t path_show(struct pci_slot *pci_slot, char *buf)
|
||||||
char *buf)
|
|
||||||
{
|
{
|
||||||
int retval = -ENOENT;
|
int retval = -ENOENT;
|
||||||
struct slot *slot = bss_hotplug_slot->private;
|
struct slot *slot = pci_slot->hotplug->private;
|
||||||
|
|
||||||
if (!slot)
|
if (!slot)
|
||||||
return retval;
|
return retval;
|
||||||
@ -103,13 +102,7 @@ static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct hotplug_slot_attribute {
|
static struct pci_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
|
||||||
struct attribute attr;
|
|
||||||
ssize_t (*show)(struct hotplug_slot *, char *);
|
|
||||||
ssize_t (*store)(struct hotplug_slot *, const char *, size_t);
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
|
|
||||||
|
|
||||||
static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device)
|
static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user