diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-23 08:34:10 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-23 08:34:10 -0400 |
commit | 919251758195919ae3568021bc221e4f8c4b20eb (patch) | |
tree | 81137a037ff8e6c91cc8de72d568275605c653c5 /drivers/video | |
parent | c394f1eafef61c6666f5876afde6110a276c4c9f (diff) | |
parent | 3eeab61aa3ddd3c0bedb7449ada1599de22fdb5a (diff) |
Merge branch 'mainline' into upstream-linus
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/S3triofb.c | 12 | ||||
-rw-r--r-- | drivers/video/aty/radeon_base.c | 8 | ||||
-rw-r--r-- | drivers/video/aty/radeon_monitor.c | 12 | ||||
-rw-r--r-- | drivers/video/aty/radeon_pm.c | 4 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 4 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_of.c | 12 | ||||
-rw-r--r-- | drivers/video/offb.c | 22 | ||||
-rw-r--r-- | drivers/video/riva/fbdev.c | 5 |
8 files changed, 38 insertions, 41 deletions
diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c index afd146f5f683..397005eb392d 100644 --- a/drivers/video/S3triofb.c +++ b/drivers/video/S3triofb.c | |||
@@ -349,30 +349,30 @@ static void __init s3triofb_of_init(struct device_node *dp) | |||
349 | s3trio_name[sizeof(s3trio_name)-1] = '\0'; | 349 | s3trio_name[sizeof(s3trio_name)-1] = '\0'; |
350 | strcpy(fb_fix.id, s3trio_name); | 350 | strcpy(fb_fix.id, s3trio_name); |
351 | 351 | ||
352 | if((pp = (int *)get_property(dp, "vendor-id", &len)) != NULL | 352 | if((pp = get_property(dp, "vendor-id", &len)) != NULL |
353 | && *pp!=PCI_VENDOR_ID_S3) { | 353 | && *pp!=PCI_VENDOR_ID_S3) { |
354 | printk("%s: can't find S3 Trio board\n", dp->full_name); | 354 | printk("%s: can't find S3 Trio board\n", dp->full_name); |
355 | return; | 355 | return; |
356 | } | 356 | } |
357 | 357 | ||
358 | if((pp = (int *)get_property(dp, "device-id", &len)) != NULL | 358 | if((pp = get_property(dp, "device-id", &len)) != NULL |
359 | && *pp!=PCI_DEVICE_ID_S3_TRIO) { | 359 | && *pp!=PCI_DEVICE_ID_S3_TRIO) { |
360 | printk("%s: can't find S3 Trio board\n", dp->full_name); | 360 | printk("%s: can't find S3 Trio board\n", dp->full_name); |
361 | return; | 361 | return; |
362 | } | 362 | } |
363 | 363 | ||
364 | if ((pp = (int *)get_property(dp, "depth", &len)) != NULL | 364 | if ((pp = get_property(dp, "depth", &len)) != NULL |
365 | && len == sizeof(int) && *pp != 8) { | 365 | && len == sizeof(int) && *pp != 8) { |
366 | printk("%s: can't use depth = %d\n", dp->full_name, *pp); | 366 | printk("%s: can't use depth = %d\n", dp->full_name, *pp); |
367 | return; | 367 | return; |
368 | } | 368 | } |
369 | if ((pp = (int *)get_property(dp, "width", &len)) != NULL | 369 | if ((pp = get_property(dp, "width", &len)) != NULL |
370 | && len == sizeof(int)) | 370 | && len == sizeof(int)) |
371 | fb_var.xres = fb_var.xres_virtual = *pp; | 371 | fb_var.xres = fb_var.xres_virtual = *pp; |
372 | if ((pp = (int *)get_property(dp, "height", &len)) != NULL | 372 | if ((pp = get_property(dp, "height", &len)) != NULL |
373 | && len == sizeof(int)) | 373 | && len == sizeof(int)) |
374 | fb_var.yres = fb_var.yres_virtual = *pp; | 374 | fb_var.yres = fb_var.yres_virtual = *pp; |
375 | if ((pp = (int *)get_property(dp, "linebytes", &len)) != NULL | 375 | if ((pp = get_property(dp, "linebytes", &len)) != NULL |
376 | && len == sizeof(int)) | 376 | && len == sizeof(int)) |
377 | fb_fix.line_length = *pp; | 377 | fb_fix.line_length = *pp; |
378 | else | 378 | else |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 8e3400d5dd21..0ed577e7cc21 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -413,11 +413,11 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo) | |||
413 | static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | 413 | static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) |
414 | { | 414 | { |
415 | struct device_node *dp = rinfo->of_node; | 415 | struct device_node *dp = rinfo->of_node; |
416 | u32 *val; | 416 | const u32 *val; |
417 | 417 | ||
418 | if (dp == NULL) | 418 | if (dp == NULL) |
419 | return -ENODEV; | 419 | return -ENODEV; |
420 | val = (u32 *) get_property(dp, "ATY,RefCLK", NULL); | 420 | val = get_property(dp, "ATY,RefCLK", NULL); |
421 | if (!val || !*val) { | 421 | if (!val || !*val) { |
422 | printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n"); | 422 | printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n"); |
423 | return -EINVAL; | 423 | return -EINVAL; |
@@ -425,11 +425,11 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | |||
425 | 425 | ||
426 | rinfo->pll.ref_clk = (*val) / 10; | 426 | rinfo->pll.ref_clk = (*val) / 10; |
427 | 427 | ||
428 | val = (u32 *) get_property(dp, "ATY,SCLK", NULL); | 428 | val = get_property(dp, "ATY,SCLK", NULL); |
429 | if (val && *val) | 429 | if (val && *val) |
430 | rinfo->pll.sclk = (*val) / 10; | 430 | rinfo->pll.sclk = (*val) / 10; |
431 | 431 | ||
432 | val = (u32 *) get_property(dp, "ATY,MCLK", NULL); | 432 | val = get_property(dp, "ATY,MCLK", NULL); |
433 | if (val && *val) | 433 | if (val && *val) |
434 | rinfo->pll.mclk = (*val) / 10; | 434 | rinfo->pll.mclk = (*val) / 10; |
435 | 435 | ||
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 f31e606a2ded..e308ed2d249a 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
@@ -1268,7 +1268,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo) | |||
1268 | 0x21320032, 0xa1320032, 0x21320032, 0xffffffff, | 1268 | 0x21320032, 0xa1320032, 0x21320032, 0xffffffff, |
1269 | 0x31320032 }; | 1269 | 0x31320032 }; |
1270 | 1270 | ||
1271 | u32 *mrtable = default_mrtable; | 1271 | const u32 *mrtable = default_mrtable; |
1272 | int i, mrtable_size = ARRAY_SIZE(default_mrtable); | 1272 | int i, mrtable_size = ARRAY_SIZE(default_mrtable); |
1273 | 1273 | ||
1274 | mdelay(30); | 1274 | mdelay(30); |
@@ -1287,7 +1287,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo) | |||
1287 | if (rinfo->of_node != NULL) { | 1287 | if (rinfo->of_node != NULL) { |
1288 | int size; | 1288 | int size; |
1289 | 1289 | ||
1290 | mrtable = (u32 *)get_property(rinfo->of_node, "ATY,MRT", &size); | 1290 | mrtable = get_property(rinfo->of_node, "ATY,MRT", &size); |
1291 | if (mrtable) | 1291 | if (mrtable) |
1292 | mrtable_size = size >> 2; | 1292 | mrtable_size = size >> 2; |
1293 | else | 1293 | else |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 390439b3d899..1b4f75d1f8a9 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -3197,11 +3197,11 @@ static void fbcon_exit(void) | |||
3197 | return; | 3197 | return; |
3198 | 3198 | ||
3199 | #ifdef CONFIG_ATARI | 3199 | #ifdef CONFIG_ATARI |
3200 | free_irq(IRQ_AUTO_4, fbcon_vbl_handler); | 3200 | free_irq(IRQ_AUTO_4, fb_vbl_handler); |
3201 | #endif | 3201 | #endif |
3202 | #ifdef CONFIG_MAC | 3202 | #ifdef CONFIG_MAC |
3203 | if (MACH_IS_MAC && vbl_detected) | 3203 | if (MACH_IS_MAC && vbl_detected) |
3204 | free_irq(IRQ_MAC_VBL, fbcon_vbl_handler); | 3204 | free_irq(IRQ_MAC_VBL, fb_vbl_handler); |
3205 | #endif | 3205 | #endif |
3206 | 3206 | ||
3207 | kfree((void *)softback_buf); | 3207 | kfree((void *)softback_buf); |
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 | } |
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 0013311e0564..bad0e98fb3b6 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -409,30 +409,30 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node) | |||
409 | unsigned int flags, rsize, addr_prop = 0; | 409 | unsigned int flags, rsize, addr_prop = 0; |
410 | unsigned long max_size = 0; | 410 | unsigned long max_size = 0; |
411 | u64 rstart, address = OF_BAD_ADDR; | 411 | u64 rstart, address = OF_BAD_ADDR; |
412 | u32 *pp, *addrp, *up; | 412 | const u32 *pp, *addrp, *up; |
413 | u64 asize; | 413 | u64 asize; |
414 | 414 | ||
415 | pp = (u32 *)get_property(dp, "linux,bootx-depth", &len); | 415 | pp = get_property(dp, "linux,bootx-depth", &len); |
416 | if (pp == NULL) | 416 | if (pp == NULL) |
417 | pp = (u32 *)get_property(dp, "depth", &len); | 417 | pp = get_property(dp, "depth", &len); |
418 | if (pp && len == sizeof(u32)) | 418 | if (pp && len == sizeof(u32)) |
419 | depth = *pp; | 419 | depth = *pp; |
420 | 420 | ||
421 | pp = (u32 *)get_property(dp, "linux,bootx-width", &len); | 421 | pp = get_property(dp, "linux,bootx-width", &len); |
422 | if (pp == NULL) | 422 | if (pp == NULL) |
423 | pp = (u32 *)get_property(dp, "width", &len); | 423 | pp = get_property(dp, "width", &len); |
424 | if (pp && len == sizeof(u32)) | 424 | if (pp && len == sizeof(u32)) |
425 | width = *pp; | 425 | width = *pp; |
426 | 426 | ||
427 | pp = (u32 *)get_property(dp, "linux,bootx-height", &len); | 427 | pp = get_property(dp, "linux,bootx-height", &len); |
428 | if (pp == NULL) | 428 | if (pp == NULL) |
429 | pp = (u32 *)get_property(dp, "height", &len); | 429 | pp = get_property(dp, "height", &len); |
430 | if (pp && len == sizeof(u32)) | 430 | if (pp && len == sizeof(u32)) |
431 | height = *pp; | 431 | height = *pp; |
432 | 432 | ||
433 | pp = (u32 *)get_property(dp, "linux,bootx-linebytes", &len); | 433 | pp = get_property(dp, "linux,bootx-linebytes", &len); |
434 | if (pp == NULL) | 434 | if (pp == NULL) |
435 | pp = (u32 *)get_property(dp, "linebytes", &len); | 435 | pp = get_property(dp, "linebytes", &len); |
436 | if (pp && len == sizeof(u32)) | 436 | if (pp && len == sizeof(u32)) |
437 | pitch = *pp; | 437 | pitch = *pp; |
438 | else | 438 | else |
@@ -450,9 +450,9 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node) | |||
450 | * ranges and pick one that is both big enough and if possible encloses | 450 | * ranges and pick one that is both big enough and if possible encloses |
451 | * the "address" property. If none match, we pick the biggest | 451 | * the "address" property. If none match, we pick the biggest |
452 | */ | 452 | */ |
453 | up = (u32 *)get_property(dp, "linux,bootx-addr", &len); | 453 | up = get_property(dp, "linux,bootx-addr", &len); |
454 | if (up == NULL) | 454 | if (up == NULL) |
455 | up = (u32 *)get_property(dp, "address", &len); | 455 | up = get_property(dp, "address", &len); |
456 | if (up && len == sizeof(u32)) | 456 | if (up && len == sizeof(u32)) |
457 | addr_prop = *up; | 457 | addr_prop = *up; |
458 | 458 | ||
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 8ddb47a56b07..67d1e1c8813d 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -1835,14 +1835,13 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) | |||
1835 | NVTRACE_ENTER(); | 1835 | NVTRACE_ENTER(); |
1836 | dp = pci_device_to_OF_node(pd); | 1836 | dp = pci_device_to_OF_node(pd); |
1837 | for (; dp != NULL; dp = dp->child) { | 1837 | for (; dp != NULL; dp = dp->child) { |
1838 | disptype = (unsigned char *)get_property(dp, "display-type", NULL); | 1838 | disptype = get_property(dp, "display-type", NULL); |
1839 | if (disptype == NULL) | 1839 | if (disptype == NULL) |
1840 | continue; | 1840 | continue; |
1841 | if (strncmp(disptype, "LCD", 3) != 0) | 1841 | if (strncmp(disptype, "LCD", 3) != 0) |
1842 | continue; | 1842 | continue; |
1843 | for (i = 0; propnames[i] != NULL; ++i) { | 1843 | for (i = 0; propnames[i] != NULL; ++i) { |
1844 | pedid = (unsigned char *) | 1844 | pedid = get_property(dp, propnames[i], NULL); |
1845 | get_property(dp, propnames[i], NULL); | ||
1846 | if (pedid != NULL) { | 1845 | if (pedid != NULL) { |
1847 | par->EDID = pedid; | 1846 | par->EDID = pedid; |
1848 | NVTRACE("LCD found.\n"); | 1847 | NVTRACE("LCD found.\n"); |