aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 01:40:40 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 01:55:05 -0400
commitb04e3dd4ab4c7763a4ca8f751caaf69ce8dabbba (patch)
tree0224891d9ea4bfa4b1b8245d498cf2fa81737884 /drivers/video/nvidia
parent018a3d1db7cdb6127656c1622ee1d2302e16436d (diff)
[POWERPC] video & agp: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific video & agp driver changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r--drivers/video/nvidia/nv_of.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c
index 8209106e26ee..d9af88c2b580 100644
--- a/drivers/video/nvidia/nv_of.c
+++ b/drivers/video/nvidia/nv_of.c
@@ -32,7 +32,7 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid)
32{ 32{
33 struct nvidia_par *par = info->par; 33 struct nvidia_par *par = info->par;
34 struct device_node *parent, *dp; 34 struct device_node *parent, *dp;
35 unsigned char *pedid = NULL; 35 const unsigned char *pedid = NULL;
36 static char *propnames[] = { 36 static char *propnames[] = {
37 "DFP,EDID", "LCD,EDID", "EDID", "EDID1", 37 "DFP,EDID", "LCD,EDID", "EDID", "EDID1",
38 "EDID,B", "EDID,A", NULL }; 38 "EDID,B", "EDID,A", NULL };
@@ -42,20 +42,19 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid)
42 if (parent == NULL) 42 if (parent == NULL)
43 return -1; 43 return -1;
44 if (par->twoHeads) { 44 if (par->twoHeads) {
45 char *pname; 45 const char *pname;
46 int len; 46 int len;
47 47
48 for (dp = NULL; 48 for (dp = NULL;
49 (dp = of_get_next_child(parent, dp)) != NULL;) { 49 (dp = of_get_next_child(parent, dp)) != NULL;) {
50 pname = (char *)get_property(dp, "name", NULL); 50 pname = get_property(dp, "name", NULL);
51 if (!pname) 51 if (!pname)
52 continue; 52 continue;
53 len = strlen(pname); 53 len = strlen(pname);
54 if ((pname[len-1] == 'A' && conn == 1) || 54 if ((pname[len-1] == 'A' && conn == 1) ||
55 (pname[len-1] == 'B' && conn == 2)) { 55 (pname[len-1] == 'B' && conn == 2)) {
56 for (i = 0; propnames[i] != NULL; ++i) { 56 for (i = 0; propnames[i] != NULL; ++i) {
57 pedid = (unsigned char *) 57 pedid = get_property(dp, propnames[i],
58 get_property(dp, propnames[i],
59 NULL); 58 NULL);
60 if (pedid != NULL) 59 if (pedid != NULL)
61 break; 60 break;
@@ -67,8 +66,7 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid)
67 } 66 }
68 if (pedid == NULL) { 67 if (pedid == NULL) {
69 for (i = 0; propnames[i] != NULL; ++i) { 68 for (i = 0; propnames[i] != NULL; ++i) {
70 pedid = (unsigned char *) 69 pedid = get_property(parent, propnames[i], NULL);
71 get_property(parent, propnames[i], NULL);
72 if (pedid != NULL) 70 if (pedid != NULL)
73 break; 71 break;
74 } 72 }