hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/video/fbdev/riva/fbdev.c
....@@ -202,11 +202,7 @@
202202 static int forceCRTC = -1;
203203 static bool noaccel = 0;
204204 static bool nomtrr = 0;
205
-#ifdef CONFIG_PMAC_BACKLIGHT
206
-static int backlight = 1;
207
-#else
208
-static int backlight = 0;
209
-#endif
205
+static int backlight = IS_BUILTIN(CONFIG_PMAC_BACKLIGHT);
210206
211207 static char *mode_option = NULL;
212208 static bool strictmode = 0;
....@@ -1100,7 +1096,7 @@
11001096 break;
11011097 case 9 ... 15:
11021098 var->green.length = 5;
1103
- /* fall through */
1099
+ fallthrough;
11041100 case 16:
11051101 var->bits_per_pixel = 16;
11061102 /* The Riva128 supports RGB555 only */
....@@ -1676,7 +1672,7 @@
16761672 * ------------------------------------------------------------------------- */
16771673
16781674 /* kernel interface */
1679
-static struct fb_ops riva_fb_ops = {
1675
+static const struct fb_ops riva_fb_ops = {
16801676 .owner = THIS_MODULE,
16811677 .fb_open = rivafb_open,
16821678 .fb_release = rivafb_release,
....@@ -1905,7 +1901,6 @@
19051901
19061902 info = framebuffer_alloc(sizeof(struct riva_par), &pd->dev);
19071903 if (!info) {
1908
- printk (KERN_ERR PFX "could not allocate memory\n");
19091904 ret = -ENOMEM;
19101905 goto err_ret;
19111906 }