#include <linux/dmi.h>
#include <linux/sysfs.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/nls.h>
#include <linux/acpi.h>
#include <linux/pci-acpi.h>
#include "pci.h"
static bool device_has_acpi_name(struct device *dev)
{ … }
#ifdef CONFIG_DMI
enum smbios_attr_enum { … };
static size_t find_smbios_instance_string(struct pci_dev *pdev, char *buf,
enum smbios_attr_enum attribute)
{ … }
static ssize_t smbios_label_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static struct device_attribute dev_attr_smbios_label = …;
static ssize_t index_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(index);
static struct attribute *smbios_attrs[] = …;
static umode_t smbios_attr_is_visible(struct kobject *kobj, struct attribute *a,
int n)
{ … }
const struct attribute_group pci_dev_smbios_attr_group = …;
#endif
#ifdef CONFIG_ACPI
enum acpi_attr_enum { … };
static int dsm_label_utf16s_to_utf8s(union acpi_object *obj, char *buf)
{ … }
static int dsm_get_label(struct device *dev, char *buf,
enum acpi_attr_enum attr)
{ … }
static ssize_t label_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(label);
static ssize_t acpi_index_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(acpi_index);
static struct attribute *acpi_attrs[] = …;
static umode_t acpi_attr_is_visible(struct kobject *kobj, struct attribute *a,
int n)
{ … }
const struct attribute_group pci_dev_acpi_attr_group = …;
#endif