提交 eebfcfb5 编写于 作者: G Greg Kroah-Hartman 提交者: Jesse Barnes

PCI: handle pci_name() being const

This changes pci_setup_device to handle pci_name() now returning a
constant string.
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 80be0385
......@@ -713,9 +713,9 @@ static int pci_setup_device(struct pci_dev * dev)
{
u32 class;
snprintf(dev->dev.bus_id, BUS_ID_SIZE,
"%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn));
pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
dev->revision = class & 0xff;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册