mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
PCI: pci-sysfs.c: convert to use BUS_ATTR_WO
We are trying to get rid of BUS_ATTR() and the usage of that in pci-sysfs.c can be trivially converted to use BUS_ATTR_WO(), so use that instead. Cc: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d61dfafc30
commit
1094f6d067
@ -412,8 +412,7 @@ static ssize_t msi_bus_store(struct device *dev, struct device_attribute *attr,
|
|||||||
}
|
}
|
||||||
static DEVICE_ATTR_RW(msi_bus);
|
static DEVICE_ATTR_RW(msi_bus);
|
||||||
|
|
||||||
static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
|
static ssize_t rescan_store(struct bus_type *bus, const char *buf, size_t count)
|
||||||
size_t count)
|
|
||||||
{
|
{
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
struct pci_bus *b = NULL;
|
struct pci_bus *b = NULL;
|
||||||
@ -429,7 +428,7 @@ 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);
|
static BUS_ATTR_WO(rescan);
|
||||||
|
|
||||||
static struct attribute *pci_bus_attrs[] = {
|
static struct attribute *pci_bus_attrs[] = {
|
||||||
&bus_attr_rescan.attr,
|
&bus_attr_rescan.attr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user