Skip to content

Commit d8e7d53

Browse files
gregkhbjorn-helgaas
authored andcommitted
PCI: Rename sysfs 'enabled' file back to 'enable'
Back in commit 5136b2d ("PCI: convert bus code to use dev_groups"), I misstyped the 'enable' sysfs filename as 'enabled', which broke the userspace API. This patch fixes that issue by renaming the file back. Fixes: 5136b2d ("PCI: convert bus code to use dev_groups") Reported-by: Jeff Epler <jepler@unpythonic.net> Tested-by: Jeff Epler <jepler@unpythonic.net> # on v3.14-rt Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # 3.13
1 parent a2fa6f6 commit d8e7d53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/pci/pci-sysfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
185185
}
186186
static DEVICE_ATTR_RO(modalias);
187187

188-
static ssize_t enabled_store(struct device *dev, struct device_attribute *attr,
188+
static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
189189
const char *buf, size_t count)
190190
{
191191
struct pci_dev *pdev = to_pci_dev(dev);
@@ -210,15 +210,15 @@ static ssize_t enabled_store(struct device *dev, struct device_attribute *attr,
210210
return result < 0 ? result : count;
211211
}
212212

213-
static ssize_t enabled_show(struct device *dev, struct device_attribute *attr,
213+
static ssize_t enable_show(struct device *dev, struct device_attribute *attr,
214214
char *buf)
215215
{
216216
struct pci_dev *pdev;
217217

218218
pdev = to_pci_dev(dev);
219219
return sprintf(buf, "%u\n", atomic_read(&pdev->enable_cnt));
220220
}
221-
static DEVICE_ATTR_RW(enabled);
221+
static DEVICE_ATTR_RW(enable);
222222

223223
#ifdef CONFIG_NUMA
224224
static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr,
@@ -563,7 +563,7 @@ static struct attribute *pci_dev_attrs[] = {
563563
#endif
564564
&dev_attr_dma_mask_bits.attr,
565565
&dev_attr_consistent_dma_mask_bits.attr,
566-
&dev_attr_enabled.attr,
566+
&dev_attr_enable.attr,
567567
&dev_attr_broken_parity_status.attr,
568568
&dev_attr_msi_bus.attr,
569569
#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)

0 commit comments

Comments
 (0)