staging: fbtft: core: Don't set device platform_data
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 30 Jul 2015 17:55:01 +0000 (19:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Aug 2015 00:45:02 +0000 (17:45 -0700)
commitad6d8812aa9574b11d5f7a0d322d3b42be24206d
tree54e585a31b2b873b3d19e975bbf4b0c6526d15cb
parentbc7ac432536710193adfb7a05488f8c2e20fbbc2
staging: fbtft: core: Don't set device platform_data

Pass platform_data as an argument to fbtft_framebuffer_alloc()
instead of using dev->platform_data.

This fixes an issue where the device comes from Device Tree
and fbtft_probe_common() sets dev->platform_data to allocated
memory. When the module is reloaded, dev->platform_data points
to freed memory.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c
drivers/staging/fbtft/fbtft.h
drivers/staging/fbtft/flexfb.c
This page took 0.027088 seconds and 5 git commands to generate.