-
- Downloads
[VIDEO]: Fix OOPS in all SBUS framebuffer drivers.
All of these drivers use a silly:
struct all_info {
struct fb_info info;
struct foo_par par;
};
struct all_info *all = kzalloc(sizeof(*all), GFP_KERNEL);
all->info.par = &all->par;
etc. etc. code sequence, basically replicating the provided
framebuffer_alloc()/framebuffer_release(), and doing it badly.
Not only is this massive code duplication, it also caused a
bug in that we weren't setting the fb_info->device pointer
which results in an OOPS when fb_is_primary_device() runs.
Fix all of this by using framebuffer_{alloc,release}() and
passing in "&of_device->dev" as the device pointer.
Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/video/bw2.c 53 additions, 52 deletionsdrivers/video/bw2.c
- drivers/video/cg14.c 72 additions, 78 deletionsdrivers/video/cg14.c
- drivers/video/cg3.c 67 additions, 69 deletionsdrivers/video/cg3.c
- drivers/video/cg6.c 73 additions, 88 deletionsdrivers/video/cg6.c
- drivers/video/ffb.c 79 additions, 91 deletionsdrivers/video/ffb.c
- drivers/video/leo.c 70 additions, 77 deletionsdrivers/video/leo.c
- drivers/video/p9100.c 63 additions, 75 deletionsdrivers/video/p9100.c
- drivers/video/tcx.c 90 additions, 94 deletionsdrivers/video/tcx.c
Loading
Please register or sign in to comment