From: aherrman@arcor.de
To: benh@kernel.crashing.org,
linux-fbdev-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] radeonfb: use PCI device Id in hex for name string
Date: Tue, 4 Sep 2007 13:00:50 +0200 [thread overview]
Message-ID: <20070904110050.GH7320@devil> (raw)
.. instead of potentially using nonprintable characters.
I guess the former (odd) concatenation was used to construct name strings
that match the "*_ATI_RADEON_??" macros in include/linux/pci_ids.h
The PCI Id in hex is much more convenient to use. E.g. it can easily be
verified against "lspci -nn" output.
Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
---
drivers/video/aty/radeon_base.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 71b0c17..e6229b4 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2184,9 +2184,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
rinfo->lvds_timer.function = radeon_lvds_timer_func;
rinfo->lvds_timer.data = (unsigned long)rinfo;
- strcpy(rinfo->name, "ATI Radeon XX ");
- rinfo->name[11] = ent->device >> 8;
- rinfo->name[12] = ent->device & 0xFF;
+ snprintf(rinfo->name, sizeof(rinfo->name),
+ "ATI Radeon %x", ent->device & 0xffff);
rinfo->family = ent->driver_data & CHIP_FAMILY_MASK;
rinfo->chipset = pdev->device;
rinfo->has_CRTC2 = (ent->driver_data & CHIP_HAS_CRTC2) != 0;
--
1.5.3
next reply other threads:[~2007-09-04 11:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-04 11:00 aherrman [this message]
2007-09-04 13:48 ` [PATCH 4/4] radeonfb: use PCI device Id in hex for name string Benjamin Herrenschmidt
2007-09-10 21:41 ` aherrman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070904110050.GH7320@devil \
--to=aherrman@arcor.de \
--cc=benh@kernel.crashing.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).