summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft/fbtft.h
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2015-07-30 19:55:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 17:45:02 -0700
commitad6d8812aa9574b11d5f7a0d322d3b42be24206d (patch)
tree54e585a31b2b873b3d19e975bbf4b0c6526d15cb /drivers/staging/fbtft/fbtft.h
parentbc7ac432536710193adfb7a05488f8c2e20fbbc2 (diff)
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>
Diffstat (limited to 'drivers/staging/fbtft/fbtft.h')
-rw-r--r--drivers/staging/fbtft/fbtft.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 7d817eb26eab..ab4a65818786 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -264,8 +264,9 @@ struct fbtft_par {
/* fbtft-core.c */
extern void fbtft_dbg_hex(const struct device *dev,
int groupsize, void *buf, size_t len, const char *fmt, ...);
-extern struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
- struct device *dev);
+struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
+ struct device *dev,
+ struct fbtft_platform_data *pdata);
extern void fbtft_framebuffer_release(struct fb_info *info);
extern int fbtft_register_framebuffer(struct fb_info *fb_info);
extern int fbtft_unregister_framebuffer(struct fb_info *fb_info);