]> Pileus Git - ~andy/linux/commit
PCI/MSI: Export MSI mode using attributes, not kobjects
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2013 20:30:17 +0000 (12:30 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 19 Dec 2013 22:14:52 +0000 (15:14 -0700)
commit1c51b50c2995f543d145d3bce78029ac9f8ca6b3
treee45ceda96d94d1141919488165eed037e770e92c
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae
PCI/MSI: Export MSI mode using attributes, not kobjects

The PCI MSI sysfs code is a mess with kobjects for things that don't really
need to be kobjects.  This patch creates attributes dynamically for the MSI
interrupts instead of using kobjects.

Note, this removes a directory from sysfs.  Old MSI kobjects:

  pci_device
     └── msi_irqs
         └── 40
             └── mode

New MSI attributes:

  pci_device
     └── msi_irqs
         └── 40

As there was only one file "mode" with the kobject model, the interrupt
number is now a file that returns the "mode" of the interrupt (msi vs.
msix).

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Documentation/ABI/testing/sysfs-bus-pci
drivers/pci/msi.c
include/linux/pci.h