mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
parisc: Fix device names in /proc/iomem
commit cab56b51ec
upstream.
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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e2a521a7dc
commit
d6f6d01c89
1 changed files with 4 additions and 5 deletions
|
@ -505,7 +505,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
|||
dev->id.hversion_rev = iodc_data[1] & 0x0f;
|
||||
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
|
||||
(iodc_data[5] << 8) | iodc_data[6];
|
||||
dev->hpa.name = parisc_pathname(dev);
|
||||
dev->hpa.start = hpa;
|
||||
/* This is awkward. The STI spec says that gfx devices may occupy
|
||||
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
|
||||
|
@ -519,10 +518,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
|||
dev->hpa.end = hpa + 0xfff;
|
||||
}
|
||||
dev->hpa.flags = IORESOURCE_MEM;
|
||||
name = parisc_hardware_description(&dev->id);
|
||||
if (name) {
|
||||
strlcpy(dev->name, name, sizeof(dev->name));
|
||||
}
|
||||
dev->hpa.name = dev->name;
|
||||
name = parisc_hardware_description(&dev->id) ? : "unknown";
|
||||
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
|
||||
name, parisc_pathname(dev));
|
||||
|
||||
/* Silently fail things like mouse ports which are subsumed within
|
||||
* the keyboard controller
|
||||
|
|
Loading…
Reference in a new issue