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
..
2008-07-25 10:53:26 -07:00
2008-02-03 17:48:52 +02:00
2005-10-18 08:26:15 -07:00
2007-05-11 05:38:25 -04:00
2008-07-24 10:47:33 -07:00
2008-06-06 11:29:10 -07:00
2007-07-16 09:05:50 -07:00
2007-07-17 10:23:04 -07:00
2006-06-25 10:01:20 -07:00
2008-02-03 17:48:52 +02:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-01-06 15:59:11 -08:00
2009-01-01 10:12:19 +10:30
2008-04-29 08:11:16 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-05-14 19:11:14 -07:00
2007-10-19 11:53:41 -07:00
2009-04-02 19:04:53 -07:00
2006-06-20 20:24:58 -07:00
2008-07-26 12:00:07 -07:00
2006-10-06 08:53:40 -07:00
2008-01-24 20:40:05 -08:00
2009-02-11 13:38:00 +11:00
2009-03-28 23:05:50 +01:00
2008-07-26 12:00:07 -07:00
2005-04-16 15:20:36 -07:00
2008-07-30 16:29:19 -07:00
2009-04-01 08:59:17 -07:00
2008-01-30 13:33:00 +01:00
2008-07-26 12:00:10 -07:00
2008-07-26 12:00:10 -07:00
2008-07-22 19:24:31 +10:00