forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/video/fbdev/chipsfb.c
....@@ -27,7 +27,6 @@
2727 #include <linux/init.h>
2828 #include <linux/pci.h>
2929 #include <linux/console.h>
30
-#include <asm/io.h>
3130
3231 #ifdef CONFIG_PMAC_BACKLIGHT
3332 #include <asm/backlight.h>
....@@ -80,7 +79,7 @@
8079 u_int transp, struct fb_info *info);
8180 static int chipsfb_blank(int blank, struct fb_info *info);
8281
83
-static struct fb_ops chipsfb_ops = {
82
+static const struct fb_ops chipsfb_ops = {
8483 .owner = THIS_MODULE,
8584 .fb_check_var = chipsfb_check_var,
8685 .fb_set_par = chipsfb_set_par,
....@@ -367,7 +366,6 @@
367366
368367 p = framebuffer_alloc(0, &dp->dev);
369368 if (p == NULL) {
370
- dev_err(&dp->dev, "Cannot allocate framebuffer structure\n");
371369 rc = -ENOMEM;
372370 goto err_disable;
373371 }
....@@ -400,7 +398,7 @@
400398 #endif /* CONFIG_PMAC_BACKLIGHT */
401399
402400 #ifdef CONFIG_PPC
403
- p->screen_base = __ioremap(addr, 0x200000, _PAGE_NO_CACHE);
401
+ p->screen_base = ioremap_wc(addr, 0x200000);
404402 #else
405403 p->screen_base = ioremap(addr, 0x200000);
406404 #endif
....@@ -432,6 +430,7 @@
432430 err_release_fb:
433431 framebuffer_release(p);
434432 err_disable:
433
+ pci_disable_device(dp);
435434 err_out:
436435 return rc;
437436 }