Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f49ba55 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Bjorn Helgaas
Browse files

PCI: convert bus code to use bus_groups



The bus_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the PCI bus code to use the
correct field.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a10c2ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1317,7 +1317,7 @@ struct bus_type pci_bus_type = {
	.remove		= pci_device_remove,
	.remove		= pci_device_remove,
	.shutdown	= pci_device_shutdown,
	.shutdown	= pci_device_shutdown,
	.dev_attrs	= pci_dev_attrs,
	.dev_attrs	= pci_dev_attrs,
	.bus_attrs	= pci_bus_attrs,
	.bus_groups	= pci_bus_groups,
	.drv_attrs	= pci_drv_attrs,
	.drv_attrs	= pci_drv_attrs,
	.pm		= PCI_PM_OPS_PTR,
	.pm		= PCI_PM_OPS_PTR,
};
};
+13 −3
Original line number Original line Diff line number Diff line
@@ -302,10 +302,20 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
	}
	}
	return count;
	return count;
}
}
static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store);


struct bus_attribute pci_bus_attrs[] = {
struct attribute *pci_bus_attrs[] = {
	__ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store),
	&bus_attr_rescan.attr,
	__ATTR_NULL
	NULL,
};

static const struct attribute_group pci_bus_group = {
	.attrs = pci_bus_attrs,
};

const struct attribute_group *pci_bus_groups[] = {
	&pci_bus_group,
	NULL,
};
};


static ssize_t
static ssize_t
+1 −1
Original line number Original line Diff line number Diff line
@@ -156,7 +156,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
extern struct device_attribute pci_dev_attrs[];
extern struct device_attribute pci_dev_attrs[];
extern const struct attribute_group *pcibus_groups[];
extern const struct attribute_group *pcibus_groups[];
extern struct device_type pci_dev_type;
extern struct device_type pci_dev_type;
extern struct bus_attribute pci_bus_attrs[];
extern const struct attribute_group *pci_bus_groups[];




/**
/**