Commit 75d01c2e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: add PCI_NAME_SIZE instead of using DEVICE_NAME_SIZE

based on a patch from OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
parent a6e676b0
......@@ -80,14 +80,14 @@ void __devinit pci_name_device(struct pci_dev *dev)
}
/* Ok, found the vendor, but unknown device */
sprintf(name, "PCI device %04x:%04x (%." DEVICE_NAME_HALF "s)",
sprintf(name, "PCI device %04x:%04x (%." PCI_NAME_HALF "s)",
dev->vendor, dev->device, vendor_p->name);
return;
/* Full match */
match_device: {
char *n = name + sprintf(name, "%." DEVICE_NAME_HALF
"s %." DEVICE_NAME_HALF "s",
char *n = name + sprintf(name, "%." PCI_NAME_HALF
"s %." PCI_NAME_HALF "s",
vendor_p->name, device_p->name);
int nr = device_p->seen + 1;
device_p->seen = nr;
......
......@@ -420,7 +420,9 @@ struct pci_dev {
unsigned int transparent:1; /* Transparent PCI bridge */
unsigned int multifunction:1;/* Part of multi-function device */
#ifdef CONFIG_PCI_NAMES
char pretty_name[DEVICE_NAME_SIZE]; /* pretty name for users to see */
#define PCI_NAME_SIZE 50
#define PCI_NAME_HALF __stringify(20) /* less than half to handle slop */
char pretty_name[PCI_NAME_SIZE]; /* pretty name for users to see */
#endif
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment