On Mon, 15 Aug 2005, James Simmons wrote:
> Could someone try this patch to make sure it works.

After adding these:
  - Kill warning about unused local variable pll_ref_div
  - Add missing return in atyfb_atari_probe()

we still need a call somewhere to correct_chipset(), and it gives the
compile errors listed below.

--- linux/drivers/video/aty/atyfb_base.c.james  2005-08-17 20:14:12.000000000 
+0200
+++ linux/drivers/video/aty/atyfb_base.c        2005-08-17 20:11:06.000000000 
+0200
@@ -2171,7 +2171,6 @@ static int __init aty_init(struct fb_inf
        const char *ramname = NULL, *xtal;
        int gtb_memsize;
        struct fb_var_screeninfo var;
-       u8 pll_ref_div;
        u32 i;
 #if defined(CONFIG_PPC)
        int sense;
@@ -2284,18 +2283,20 @@ static int __init aty_init(struct fb_inf
                        par->pll_limits.mclk = 63;
        }
 
-       if (M64_HAS(GTB_DSP)
-           && (pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par))) {
-               int diff1, diff2;
-               diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max;
-               diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max;
-               if (diff1 < 0)
-                       diff1 = -diff1;
-               if (diff2 < 0)
-                       diff2 = -diff2;
-               if (diff2 < diff1) {
-                       par->ref_clk_per = 1000000000000ULL / 29498928;
-                       xtal = "29.498928";
+       if (M64_HAS(GTB_DSP)) {
+               u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par);
+               if (pll_ref_div) {
+                       int diff1, diff2;
+                       diff1 = 510 * 14 / pll_ref_div - 
par->pll_limits.pll_max;
+                       diff2 = 510 * 29 / pll_ref_div - 
par->pll_limits.pll_max;
+                       if (diff1 < 0)
+                               diff1 = -diff1;
+                       if (diff2 < 0)
+                               diff2 = -diff2;
+                       if (diff2 < diff1) {
+                               par->ref_clk_per = 1000000000000ULL / 29498928;
+                               xtal = "29.498928";
+                       }
                }
        }
 #endif /* CONFIG_FB_ATY_CT */
@@ -3576,13 +3577,16 @@ static int __devinit atyfb_atari_probe(s
                        par->clk_wr_offset = 0; /* Panther 1 ISA Adapter 
(Gerald) */
                        break;
                }
-       }
+
+// FIXME
+//rc = correct_chipset(par);
 
        if (aty_init(info, "ISA bus")) {
                framebuffer_release(info);
                /* This is insufficient! kernel_map has added two large 
chunks!! */
                return -ENXIO;
        }
+       return 0;
 }
 
 static void __devexit atyfb_atari_remove(struct device *dev)


drivers/video/aty/atyfb_base.c: In function `store_video_par':
drivers/video/aty/atyfb_base.c:3521: warning: passing arg 3 of 
`platform_device_register_simple' from incompatible pointer type
drivers/video/aty/atyfb_base.c: In function `atyfb_atari_probe':
drivers/video/aty/atyfb_base.c:3549: dereferencing pointer to incomplete type
drivers/video/aty/atyfb_base.c:3561: dereferencing pointer to incomplete type
drivers/video/aty/atyfb_base.c:3563: warning: passing arg 3 of `aty_st_le32' 
from incompatible pointer type
drivers/video/aty/atyfb_base.c:3564: warning: passing arg 2 of `aty_ld_le32' 
from incompatible pointer type
drivers/video/aty/atyfb_base.c:3568: dereferencing pointer to incomplete type
drivers/video/aty/atyfb_base.c:3571: dereferencing pointer to incomplete type
drivers/video/aty/atyfb_base.c:3574: dereferencing pointer to incomplete type
drivers/video/aty/atyfb_base.c:3577: dereferencing pointer to incomplete type
drivers/video/aty/atyfb_base.c: At top level:
drivers/video/aty/atyfb_base.c:3602: warning: initialization from incompatible 
pointer type
drivers/video/aty/atyfb_base.c: In function `atyfb_init':
drivers/video/aty/atyfb_base.c:3703: warning: passing arg 1 of 
`platform_device_unregister' from incompatible pointer type
drivers/video/aty/atyfb_base.c: In function `atyfb_exit':
drivers/video/aty/atyfb_base.c:3719: warning: passing arg 1 of 
`platform_device_unregister' from incompatible pointer type
drivers/video/aty/atyfb_base.c: At top level:
drivers/video/aty/atyfb_base.c:415: warning: `correct_chipset' defined but not 
used

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to