aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Herrmann <aherrman@arcor.de>2008-04-28 05:15:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:37 -0400
commite7a18c9c86d14247b514157aae60326d45695476 (patch)
tree10ad71d00d74d439c57ddde82d2da35b52cfc619
parentaf2afd247f0fae25d66f210fb800fe6a2958366e (diff)
radeonfb: use PCI device id in hex for name string
Additionally provide PCI device id in character format if possible. (The printable characters were commonly used to identify the cards.) Signed-off-by: Andreas Herrmann <aherrman@arcor.de> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/aty/radeon_base.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 62867cb63fef..48e60cbc36c5 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -57,6 +57,7 @@
57#include <linux/kernel.h> 57#include <linux/kernel.h>
58#include <linux/errno.h> 58#include <linux/errno.h>
59#include <linux/string.h> 59#include <linux/string.h>
60#include <linux/ctype.h>
60#include <linux/mm.h> 61#include <linux/mm.h>
61#include <linux/slab.h> 62#include <linux/slab.h>
62#include <linux/delay.h> 63#include <linux/delay.h>
@@ -2158,6 +2159,7 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
2158 struct fb_info *info; 2159 struct fb_info *info;
2159 struct radeonfb_info *rinfo; 2160 struct radeonfb_info *rinfo;
2160 int ret; 2161 int ret;
2162 unsigned char c1, c2;
2161 2163
2162 RTRACE("radeonfb_pci_register BEGIN\n"); 2164 RTRACE("radeonfb_pci_register BEGIN\n");
2163 2165
@@ -2185,9 +2187,15 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
2185 rinfo->lvds_timer.function = radeon_lvds_timer_func; 2187 rinfo->lvds_timer.function = radeon_lvds_timer_func;
2186 rinfo->lvds_timer.data = (unsigned long)rinfo; 2188 rinfo->lvds_timer.data = (unsigned long)rinfo;
2187 2189
2188 strcpy(rinfo->name, "ATI Radeon XX "); 2190 c1 = ent->device >> 8;
2189 rinfo->name[11] = ent->device >> 8; 2191 c2 = ent->device & 0xff;
2190 rinfo->name[12] = ent->device & 0xFF; 2192 if (isprint(c1) && isprint(c2))
2193 snprintf(rinfo->name, sizeof(rinfo->name),
2194 "ATI Radeon %x \"%c%c\"", ent->device & 0xffff, c1, c2);
2195 else
2196 snprintf(rinfo->name, sizeof(rinfo->name),
2197 "ATI Radeon %x", ent->device & 0xffff);
2198
2191 rinfo->family = ent->driver_data & CHIP_FAMILY_MASK; 2199 rinfo->family = ent->driver_data & CHIP_FAMILY_MASK;
2192 rinfo->chipset = pdev->device; 2200 rinfo->chipset = pdev->device;
2193 rinfo->has_CRTC2 = (ent->driver_data & CHIP_HAS_CRTC2) != 0; 2201 rinfo->has_CRTC2 = (ent->driver_data & CHIP_HAS_CRTC2) != 0;