Source
405
405
subordinate->bus_flags &= ~PCI_BUS_FLAGS_NO_MSI;
406
406
else
407
407
subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
408
408
409
409
dev_info(&subordinate->dev, "MSI/MSI-X %s for future drivers of devices on this bus\n",
410
410
val ? "allowed" : "disallowed");
411
411
return count;
412
412
}
413
413
static DEVICE_ATTR_RW(msi_bus);
414
414
415
-
static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
416
-
size_t count)
415
+
static ssize_t rescan_store(struct bus_type *bus, const char *buf, size_t count)
417
416
{
418
417
unsigned long val;
419
418
struct pci_bus *b = NULL;
420
419
421
420
if (kstrtoul(buf, 0, &val) < 0)
422
421
return -EINVAL;
423
422
424
423
if (val) {
425
424
pci_lock_rescan_remove();
426
425
while ((b = pci_find_next_bus(b)) != NULL)
427
426
pci_rescan_bus(b);
428
427
pci_unlock_rescan_remove();
429
428
}
430
429
return count;
431
430
}
432
-
static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store);
431
+
static BUS_ATTR_WO(rescan);
433
432
434
433
static struct attribute *pci_bus_attrs[] = {
435
434
&bus_attr_rescan.attr,
436
435
NULL,
437
436
};
438
437
439
438
static const struct attribute_group pci_bus_group = {
440
439
.attrs = pci_bus_attrs,
441
440
};
442
441