PCI: Fix whitespace, capitalization, and spelling errors
Fix whitespace, capitalization, and spelling errors. No functional change. I know "busses" is not an error, but "buses" was more common, so I used it consistently. Signed-off-by: Marta Rybczynska <rybczynska@gmail.com> (pci_reset_bridge_secondary_bus()) Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* File attributes for PCI devices
|
||||
*
|
||||
* Modeled after usb's driverfs.c
|
||||
* Modeled after usb's driverfs.c
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -270,13 +270,17 @@ msi_bus_store(struct device *dev, struct device_attribute *attr,
|
||||
if (kstrtoul(buf, 0, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* bad things may happen if the no_msi flag is changed
|
||||
* while some drivers are loaded */
|
||||
/*
|
||||
* Bad things may happen if the no_msi flag is changed
|
||||
* while drivers are loaded.
|
||||
*/
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
/* Maybe pci devices without subordinate busses shouldn't even have this
|
||||
* attribute in the first place? */
|
||||
/*
|
||||
* Maybe devices without subordinate buses shouldn't have this
|
||||
* attribute in the first place?
|
||||
*/
|
||||
if (!pdev->subordinate)
|
||||
return count;
|
||||
|
||||
@@ -670,7 +674,7 @@ pci_write_config(struct file* filp, struct kobject *kobj,
|
||||
size = dev->cfg_size - off;
|
||||
count = size;
|
||||
}
|
||||
|
||||
|
||||
pci_config_pm_runtime_get(dev);
|
||||
|
||||
if ((off & 1) && size) {
|
||||
@@ -678,7 +682,7 @@ pci_write_config(struct file* filp, struct kobject *kobj,
|
||||
off++;
|
||||
size--;
|
||||
}
|
||||
|
||||
|
||||
if ((off & 3) && size > 2) {
|
||||
u16 val = data[off - init_off];
|
||||
val |= (u16) data[off - init_off + 1] << 8;
|
||||
@@ -696,7 +700,7 @@ pci_write_config(struct file* filp, struct kobject *kobj,
|
||||
off += 4;
|
||||
size -= 4;
|
||||
}
|
||||
|
||||
|
||||
if (size >= 2) {
|
||||
u16 val = data[off - init_off];
|
||||
val |= (u16) data[off - init_off + 1] << 8;
|
||||
@@ -1229,21 +1233,21 @@ pci_read_rom(struct file *filp, struct kobject *kobj,
|
||||
|
||||
if (!pdev->rom_attr_enabled)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
rom = pci_map_rom(pdev, &size); /* size starts out as PCI window size */
|
||||
if (!rom || !size)
|
||||
return -EIO;
|
||||
|
||||
|
||||
if (off >= size)
|
||||
count = 0;
|
||||
else {
|
||||
if (off + count > size)
|
||||
count = size - off;
|
||||
|
||||
|
||||
memcpy_fromio(buf, rom + off, count);
|
||||
}
|
||||
pci_unmap_rom(pdev, rom);
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user