aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty
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/aty
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/aty')
-rw-r--r--drivers/video/aty/radeon_base.c8
-rw-r--r--drivers/video/aty/radeon_monitor.c12
-rw-r--r--drivers/video/aty/radeon_pm.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 51b78f8de949..60c37add2579 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -412,11 +412,11 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo)
412static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) 412static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo)
413{ 413{
414 struct device_node *dp = rinfo->of_node; 414 struct device_node *dp = rinfo->of_node;
415 u32 *val; 415 const u32 *val;
416 416
417 if (dp == NULL) 417 if (dp == NULL)
418 return -ENODEV; 418 return -ENODEV;
419 val = (u32 *) get_property(dp, "ATY,RefCLK", NULL); 419 val = get_property(dp, "ATY,RefCLK", NULL);
420 if (!val || !*val) { 420 if (!val || !*val) {
421 printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n"); 421 printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n");
422 return -EINVAL; 422 return -EINVAL;
@@ -424,11 +424,11 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo)
424 424
425 rinfo->pll.ref_clk = (*val) / 10; 425 rinfo->pll.ref_clk = (*val) / 10;
426 426
427 val = (u32 *) get_property(dp, "ATY,SCLK", NULL); 427 val = get_property(dp, "ATY,SCLK", NULL);
428 if (val && *val) 428 if (val && *val)
429 rinfo->pll.sclk = (*val) / 10; 429 rinfo->pll.sclk = (*val) / 10;
430 430
431 val = (u32 *) get_property(dp, "ATY,MCLK", NULL); 431 val = get_property(dp, "ATY,MCLK", NULL);
432 if (val && *val) 432 if (val && *val)
433 rinfo->pll.mclk = (*val) / 10; 433 rinfo->pll.mclk = (*val) / 10;
434 434
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
index 98c05bc0de44..ea531a6f45d1 100644
--- a/drivers/video/aty/radeon_monitor.c
+++ b/drivers/video/aty/radeon_monitor.c
@@ -64,13 +64,13 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_
64{ 64{
65 static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID", 65 static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID",
66 "EDID1", "EDID2", NULL }; 66 "EDID1", "EDID2", NULL };
67 u8 *pedid = NULL; 67 const u8 *pedid = NULL;
68 u8 *pmt = NULL; 68 const u8 *pmt = NULL;
69 u8 *tmp; 69 u8 *tmp;
70 int i, mt = MT_NONE; 70 int i, mt = MT_NONE;
71 71
72 RTRACE("analyzing OF properties...\n"); 72 RTRACE("analyzing OF properties...\n");
73 pmt = (u8 *)get_property(dp, "display-type", NULL); 73 pmt = get_property(dp, "display-type", NULL);
74 if (!pmt) 74 if (!pmt)
75 return MT_NONE; 75 return MT_NONE;
76 RTRACE("display-type: %s\n", pmt); 76 RTRACE("display-type: %s\n", pmt);
@@ -89,7 +89,7 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_
89 } 89 }
90 90
91 for (i = 0; propnames[i] != NULL; ++i) { 91 for (i = 0; propnames[i] != NULL; ++i) {
92 pedid = (u8 *)get_property(dp, propnames[i], NULL); 92 pedid = get_property(dp, propnames[i], NULL);
93 if (pedid != NULL) 93 if (pedid != NULL)
94 break; 94 break;
95 } 95 }
@@ -124,14 +124,14 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_
124 return MT_NONE; 124 return MT_NONE;
125 125
126 if (rinfo->has_CRTC2) { 126 if (rinfo->has_CRTC2) {
127 char *pname; 127 const char *pname;
128 int len, second = 0; 128 int len, second = 0;
129 129
130 dp = dp->child; 130 dp = dp->child;
131 do { 131 do {
132 if (!dp) 132 if (!dp)
133 return MT_NONE; 133 return MT_NONE;
134 pname = (char *)get_property(dp, "name", NULL); 134 pname = get_property(dp, "name", NULL);
135 if (!pname) 135 if (!pname)
136 return MT_NONE; 136 return MT_NONE;
137 len = strlen(pname); 137 len = strlen(pname);
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index c7091761cef4..b9b9396d3bde 100644
--- a/drivers/video/aty/radeon_pm.c
+++ b/drivers/video/aty/radeon_pm.c
@@ -1167,7 +1167,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
1167 0x21320032, 0xa1320032, 0x21320032, 0xffffffff, 1167 0x21320032, 0xa1320032, 0x21320032, 0xffffffff,
1168 0x31320032 }; 1168 0x31320032 };
1169 1169
1170 u32 *mrtable = default_mrtable; 1170 const u32 *mrtable = default_mrtable;
1171 int i, mrtable_size = ARRAY_SIZE(default_mrtable); 1171 int i, mrtable_size = ARRAY_SIZE(default_mrtable);
1172 1172
1173 mdelay(30); 1173 mdelay(30);
@@ -1186,7 +1186,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
1186 if (rinfo->of_node != NULL) { 1186 if (rinfo->of_node != NULL) {
1187 int size; 1187 int size;
1188 1188
1189 mrtable = (u32 *)get_property(rinfo->of_node, "ATY,MRT", &size); 1189 mrtable = get_property(rinfo->of_node, "ATY,MRT", &size);
1190 if (mrtable) 1190 if (mrtable)
1191 mrtable_size = size >> 2; 1191 mrtable_size = size >> 2;
1192 else 1192 else