diff options
-rw-r--r-- | drivers/video/aty/radeon_base.c | 14 |
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; |