diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-28 06:12:00 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-10-07 17:10:46 -0400 |
commit | bf22c90fb190e837173d61368e3c80f5b78751a8 (patch) | |
tree | 227e2579cb3bfb8e1bc4bfef96560b80f0b52c43 | |
parent | 5136b2da770d53f026ab091f0423729ebf37a6b5 (diff) |
PCI: Make pci_bus_attrs, pci_dev_attrs, dev_rescan_attr, dev_remove_attr, vga_attr static
Local variables used only in this file are made static.
[bhelgaas: also make pci_dev_attrs[] static (from Fengguang)]
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/pci-sysfs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 618c06094295..82cc45867eaa 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -314,7 +314,7 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, | |||
314 | } | 314 | } |
315 | static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store); | 315 | static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store); |
316 | 316 | ||
317 | struct attribute *pci_bus_attrs[] = { | 317 | static struct attribute *pci_bus_attrs[] = { |
318 | &bus_attr_rescan.attr, | 318 | &bus_attr_rescan.attr, |
319 | NULL, | 319 | NULL, |
320 | }; | 320 | }; |
@@ -345,8 +345,9 @@ dev_rescan_store(struct device *dev, struct device_attribute *attr, | |||
345 | } | 345 | } |
346 | return count; | 346 | return count; |
347 | } | 347 | } |
348 | struct device_attribute dev_rescan_attr = __ATTR(rescan, (S_IWUSR|S_IWGRP), | 348 | static struct device_attribute dev_rescan_attr = __ATTR(rescan, |
349 | NULL, dev_rescan_store); | 349 | (S_IWUSR|S_IWGRP), |
350 | NULL, dev_rescan_store); | ||
350 | 351 | ||
351 | static void remove_callback(struct device *dev) | 352 | static void remove_callback(struct device *dev) |
352 | { | 353 | { |
@@ -376,8 +377,9 @@ remove_store(struct device *dev, struct device_attribute *dummy, | |||
376 | count = ret; | 377 | count = ret; |
377 | return count; | 378 | return count; |
378 | } | 379 | } |
379 | struct device_attribute dev_remove_attr = __ATTR(remove, (S_IWUSR|S_IWGRP), | 380 | static struct device_attribute dev_remove_attr = __ATTR(remove, |
380 | NULL, remove_store); | 381 | (S_IWUSR|S_IWGRP), |
382 | NULL, remove_store); | ||
381 | 383 | ||
382 | static ssize_t | 384 | static ssize_t |
383 | dev_bus_rescan_store(struct device *dev, struct device_attribute *attr, | 385 | dev_bus_rescan_store(struct device *dev, struct device_attribute *attr, |
@@ -510,7 +512,7 @@ static struct device_attribute sriov_numvfs_attr = | |||
510 | sriov_numvfs_show, sriov_numvfs_store); | 512 | sriov_numvfs_show, sriov_numvfs_store); |
511 | #endif /* CONFIG_PCI_IOV */ | 513 | #endif /* CONFIG_PCI_IOV */ |
512 | 514 | ||
513 | struct attribute *pci_dev_attrs[] = { | 515 | static struct attribute *pci_dev_attrs[] = { |
514 | &dev_attr_resource.attr, | 516 | &dev_attr_resource.attr, |
515 | &dev_attr_vendor.attr, | 517 | &dev_attr_vendor.attr, |
516 | &dev_attr_device.attr, | 518 | &dev_attr_device.attr, |
@@ -573,7 +575,7 @@ boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
573 | !!(pdev->resource[PCI_ROM_RESOURCE].flags & | 575 | !!(pdev->resource[PCI_ROM_RESOURCE].flags & |
574 | IORESOURCE_ROM_SHADOW)); | 576 | IORESOURCE_ROM_SHADOW)); |
575 | } | 577 | } |
576 | struct device_attribute vga_attr = __ATTR_RO(boot_vga); | 578 | static struct device_attribute vga_attr = __ATTR_RO(boot_vga); |
577 | 579 | ||
578 | static ssize_t | 580 | static ssize_t |
579 | pci_read_config(struct file *filp, struct kobject *kobj, | 581 | pci_read_config(struct file *filp, struct kobject *kobj, |