| .. | .. |
|---|
| 60 | 60 | else |
|---|
| 61 | 61 | return PIX_FMT_BGR1555; |
|---|
| 62 | 62 | } |
|---|
| 63 | | - |
|---|
| 64 | | - /* fall through */ |
|---|
| 65 | 63 | } |
|---|
| 66 | 64 | |
|---|
| 67 | 65 | /* |
|---|
| .. | .. |
|---|
| 87 | 85 | else |
|---|
| 88 | 86 | return PIX_FMT_BGR888UNPACK; |
|---|
| 89 | 87 | } |
|---|
| 90 | | - |
|---|
| 91 | | - /* fall through */ |
|---|
| 92 | 88 | } |
|---|
| 93 | 89 | |
|---|
| 94 | 90 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 279 | 275 | |
|---|
| 280 | 276 | /* check whether divisor is too small. */ |
|---|
| 281 | 277 | if (divider_int < 2) { |
|---|
| 282 | | - dev_warn(fbi->dev, "Warning: clock source is too slow." |
|---|
| 278 | + dev_warn(fbi->dev, "Warning: clock source is too slow. " |
|---|
| 283 | 279 | "Try smaller resolution\n"); |
|---|
| 284 | 280 | divider_int = 2; |
|---|
| 285 | 281 | } |
|---|
| .. | .. |
|---|
| 405 | 401 | struct fb_var_screeninfo *var = &info->var; |
|---|
| 406 | 402 | struct fb_videomode mode; |
|---|
| 407 | 403 | u32 x; |
|---|
| 408 | | - struct pxa168fb_mach_info *mi; |
|---|
| 409 | | - |
|---|
| 410 | | - mi = dev_get_platdata(fbi->dev); |
|---|
| 411 | 404 | |
|---|
| 412 | 405 | /* |
|---|
| 413 | 406 | * Set additional mode info. |
|---|
| .. | .. |
|---|
| 548 | 541 | return IRQ_NONE; |
|---|
| 549 | 542 | } |
|---|
| 550 | 543 | |
|---|
| 551 | | -static struct fb_ops pxa168fb_ops = { |
|---|
| 544 | +static const struct fb_ops pxa168fb_ops = { |
|---|
| 552 | 545 | .owner = THIS_MODULE, |
|---|
| 553 | 546 | .fb_check_var = pxa168fb_check_var, |
|---|
| 554 | 547 | .fb_set_par = pxa168fb_set_par, |
|---|
| .. | .. |
|---|
| 560 | 553 | .fb_imageblit = cfb_imageblit, |
|---|
| 561 | 554 | }; |
|---|
| 562 | 555 | |
|---|
| 563 | | -static int pxa168fb_init_mode(struct fb_info *info, |
|---|
| 556 | +static void pxa168fb_init_mode(struct fb_info *info, |
|---|
| 564 | 557 | struct pxa168fb_mach_info *mi) |
|---|
| 565 | 558 | { |
|---|
| 566 | 559 | struct pxa168fb_info *fbi = info->par; |
|---|
| 567 | 560 | struct fb_var_screeninfo *var = &info->var; |
|---|
| 568 | | - int ret = 0; |
|---|
| 569 | 561 | u32 total_w, total_h, refresh; |
|---|
| 570 | 562 | u64 div_result; |
|---|
| 571 | 563 | const struct fb_videomode *m; |
|---|
| .. | .. |
|---|
| 596 | 588 | div_result = 1000000000000ll; |
|---|
| 597 | 589 | do_div(div_result, total_w * total_h * refresh); |
|---|
| 598 | 590 | var->pixclock = (u32)div_result; |
|---|
| 599 | | - |
|---|
| 600 | | - return ret; |
|---|
| 601 | 591 | } |
|---|
| 602 | 592 | |
|---|
| 603 | 593 | static int pxa168fb_probe(struct platform_device *pdev) |
|---|
| .. | .. |
|---|
| 668 | 658 | /* |
|---|
| 669 | 659 | * Map LCD controller registers. |
|---|
| 670 | 660 | */ |
|---|
| 671 | | - fbi->reg_base = devm_ioremap_nocache(&pdev->dev, res->start, |
|---|
| 661 | + fbi->reg_base = devm_ioremap(&pdev->dev, res->start, |
|---|
| 672 | 662 | resource_size(res)); |
|---|
| 673 | 663 | if (fbi->reg_base == NULL) { |
|---|
| 674 | 664 | ret = -ENOMEM; |
|---|
| .. | .. |
|---|
| 772 | 762 | dma_free_wc(fbi->dev, info->fix.smem_len, |
|---|
| 773 | 763 | info->screen_base, fbi->fb_start_dma); |
|---|
| 774 | 764 | failed_free_info: |
|---|
| 775 | | - kfree(info); |
|---|
| 765 | + framebuffer_release(info); |
|---|
| 776 | 766 | |
|---|
| 777 | 767 | dev_err(&pdev->dev, "frame buffer device init failed with %d\n", ret); |
|---|
| 778 | 768 | return ret; |
|---|
| .. | .. |
|---|
| 782 | 772 | { |
|---|
| 783 | 773 | struct pxa168fb_info *fbi = platform_get_drvdata(pdev); |
|---|
| 784 | 774 | struct fb_info *info; |
|---|
| 785 | | - int irq; |
|---|
| 786 | 775 | unsigned int data; |
|---|
| 787 | 776 | |
|---|
| 788 | 777 | if (!fbi) |
|---|
| .. | .. |
|---|
| 801 | 790 | |
|---|
| 802 | 791 | if (info->cmap.len) |
|---|
| 803 | 792 | fb_dealloc_cmap(&info->cmap); |
|---|
| 804 | | - |
|---|
| 805 | | - irq = platform_get_irq(pdev, 0); |
|---|
| 806 | 793 | |
|---|
| 807 | 794 | dma_free_wc(fbi->dev, info->fix.smem_len, |
|---|
| 808 | 795 | info->screen_base, info->fix.smem_start); |
|---|