| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * drivers/mb862xx/mb862xxfb.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * (C) 2008 Anatolij Gustschin <agust@denx.de> |
|---|
| 7 | 8 | * DENX Software Engineering |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 11 | | - * published by the Free Software Foundation. |
|---|
| 12 | | - * |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | #undef DEBUG |
|---|
| .. | .. |
|---|
| 198 | 194 | return 0; |
|---|
| 199 | 195 | } |
|---|
| 200 | 196 | |
|---|
| 197 | +static struct fb_ops mb862xxfb_ops; |
|---|
| 198 | + |
|---|
| 201 | 199 | /* |
|---|
| 202 | 200 | * set display parameters |
|---|
| 203 | 201 | */ |
|---|
| .. | .. |
|---|
| 208 | 206 | |
|---|
| 209 | 207 | dev_dbg(par->dev, "%s\n", __func__); |
|---|
| 210 | 208 | if (par->type == BT_CORALP) |
|---|
| 211 | | - mb862xxfb_init_accel(fbi, fbi->var.xres); |
|---|
| 209 | + mb862xxfb_init_accel(fbi, &mb862xxfb_ops, fbi->var.xres); |
|---|
| 212 | 210 | |
|---|
| 213 | 211 | if (par->pre_init) |
|---|
| 214 | 212 | return 0; |
|---|
| .. | .. |
|---|
| 684 | 682 | } |
|---|
| 685 | 683 | |
|---|
| 686 | 684 | info = framebuffer_alloc(sizeof(struct mb862xxfb_par), dev); |
|---|
| 687 | | - if (info == NULL) { |
|---|
| 688 | | - dev_err(dev, "cannot allocate framebuffer\n"); |
|---|
| 685 | + if (!info) |
|---|
| 689 | 686 | return -ENOMEM; |
|---|
| 690 | | - } |
|---|
| 691 | 687 | |
|---|
| 692 | 688 | par = info->par; |
|---|
| 693 | 689 | par->info = info; |
|---|
| .. | .. |
|---|
| 1009 | 1005 | |
|---|
| 1010 | 1006 | info = framebuffer_alloc(sizeof(struct mb862xxfb_par), dev); |
|---|
| 1011 | 1007 | if (!info) { |
|---|
| 1012 | | - dev_err(dev, "framebuffer alloc failed\n"); |
|---|
| 1013 | 1008 | ret = -ENOMEM; |
|---|
| 1014 | 1009 | goto dis_dev; |
|---|
| 1015 | 1010 | } |
|---|