Skip to content

Commit cab56b5

Browse files
committed
parisc: Fix device names in /proc/iomem
Fix the output of /proc/iomem to show the real hardware device name including the pa_pathname, e.g. "Merlin 160 Core Centronics [8:16:0]". Up to now only the pa_pathname ("[8:16.0]") was shown. Signed-off-by: Helge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org> # v4.9+
1 parent b383d94 commit cab56b5

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

arch/parisc/kernel/drivers.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
520520
dev->id.hversion_rev = iodc_data[1] & 0x0f;
521521
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
522522
(iodc_data[5] << 8) | iodc_data[6];
523-
dev->hpa.name = parisc_pathname(dev);
524523
dev->hpa.start = hpa;
525524
/* This is awkward. The STI spec says that gfx devices may occupy
526525
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
@@ -534,10 +533,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
534533
dev->hpa.end = hpa + 0xfff;
535534
}
536535
dev->hpa.flags = IORESOURCE_MEM;
537-
name = parisc_hardware_description(&dev->id);
538-
if (name) {
539-
strlcpy(dev->name, name, sizeof(dev->name));
540-
}
536+
dev->hpa.name = dev->name;
537+
name = parisc_hardware_description(&dev->id) ? : "unknown";
538+
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
539+
name, parisc_pathname(dev));
541540

542541
/* Silently fail things like mouse ports which are subsumed within
543542
* the keyboard controller

0 commit comments

Comments
 (0)