PCI: sysfs: Define device attributes with DEVICE_ATTR*()
authorKelsey Skunberg <skunberg.kelsey@gmail.com>
Tue, 13 Aug 2019 20:45:11 +0000 (14:45 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 20 Aug 2019 19:04:45 +0000 (14:04 -0500)
commit8bdfa145f58220796abddc93b5038efa6e7e90fc
treef7a105f0638784a5e60ffa86cc58d1eb5c7de698
parent5a2e340690f2908371eb9c1b4cfb82ba0b235b51
PCI: sysfs: Define device attributes with DEVICE_ATTR*()

Device attributes should be defined using DEVICE_ATTR*(_name, _mode, _show,
_store).  Convert them all from __ATTR*() to DEVICE_ATTR*(), e.g.,

  - struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show,
                                                      _store)
  + static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo)

Link: https://lore.kernel.org/r/20190813204513.4790-2-skunberg.kelsey@gmail.com
Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Donald Dutile <ddutile@redhat.com>
drivers/pci/pci-sysfs.c