]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/aty/aty128fb.c
backlight: Remove unneeded owner field
[linux-2.6-omap-h63xx.git] / drivers / video / aty / aty128fb.c
index 276a21530b9527c4e5dbf1d4624ea116488f5163..1fa211c0d7bba45efbb8e1e8660117ddaa73a5fd 100644 (file)
@@ -1333,6 +1333,8 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
        if (vclk * 12 < c.ppll_min)
                vclk = c.ppll_min/12;
 
+       pll->post_divider = -1;
+
        /* now, find an acceptable divider */
        for (i = 0; i < sizeof(post_dividers); i++) {
                output_freq = post_dividers[i] * vclk;
@@ -1342,6 +1344,9 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
                }
        }
 
+       if (pll->post_divider < 0)
+               return -EINVAL;
+
        /* calculate feedback divider */
        n = c.ref_divider * output_freq;
        d = c.ref_clk;
@@ -1792,7 +1797,6 @@ static int aty128_bl_get_brightness(struct backlight_device *bd)
 }
 
 static struct backlight_properties aty128_bl_data = {
-       .owner          = THIS_MODULE,
        .get_brightness = aty128_bl_get_brightness,
        .update_status  = aty128_bl_update_status,
        .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
@@ -1829,7 +1833,7 @@ static void aty128_bl_init(struct aty128fb_par *par)
 
        snprintf(name, sizeof(name), "aty128bl%d", info->node);
 
-       bd = backlight_device_register(name, par, &aty128_bl_data);
+       bd = backlight_device_register(name, info->dev, par, &aty128_bl_data);
        if (IS_ERR(bd)) {
                info->bl_dev = NULL;
                printk(KERN_WARNING "aty128: Backlight registration failed\n");