Kay Sievers 8a577ffc75 driver: dont update dev_name via device_add path
notice one system /proc/iomem some entries missed the name for pci_devices

it turns that dev->dev.kobj name is changed after device_add.

for pci code: via acpi_pci_root_driver.ops.add (aka acpi_pci_root_add)
==> pci_acpi_scan_root is used to scan pci bus/device, and at the same
time we read the resource for pci_dev in the pci_read_bases, we have
res->name = pci_name(pci_dev); pci_name is calling dev_name.

later via acpi_pci_root_driver.ops.start (aka acpi_pci_root_start) ==>
pci_bus_add_device to add all pci_dev in kobj tree.  pci_bus_add_device
will call device_add.

actually in device_add

        /* first, register with generic layer. */
        error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev));
        if (error)
                goto Error;

will get one new name for that kobj, old name is freed.

[Impact: fix corrupted names in /proc/iomem ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-20 08:12:58 -07:00
..
2009-04-17 10:50:27 -07:00
2009-04-13 15:04:34 -07:00
2009-04-13 15:04:29 -07:00
2009-04-16 08:51:52 -07:00
2009-04-17 10:50:27 -07:00
2009-04-17 10:50:27 -07:00
2009-04-05 00:32:25 +02:00
2009-04-13 15:04:33 -07:00
2009-04-01 08:59:23 -07:00
2009-04-14 19:46:19 -07:00
2009-03-27 20:13:20 -04:00
2009-04-17 11:06:31 -07:00
2009-04-13 15:04:32 -07:00
2009-04-05 00:32:22 +02:00
2009-04-08 14:25:51 -07:00