mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pxafb: fix regression from d2a34c13e7ccec5d06eafd60e6f80ea531b34668
@ 2009-12-28 15:54 Martin Jansa
  2010-01-05 22:59 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2009-12-28 15:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Julia Lawall, Martin Jansa

fbi->dev->platform_data is void * and gcc does not allow to access
!fbi->dev->platform_data->smart_update without cast platform_data to
(struct pxafb_mach_info) or assignment as used in this patch.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 drivers/video/pxafb.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 415858b..241468c 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1223,12 +1223,17 @@ static int pxafb_smart_thread(void *arg)
 	struct pxafb_info *fbi = arg;
 	struct pxafb_mach_info *inf;
 
-	if (!fbi || !fbi->dev->platform_data->smart_update) {
+	if (!fbi) {
 		pr_err("%s: not properly initialized, thread terminated\n",
 				__func__);
 		return -EINVAL;
 	}
 	inf = fbi->dev->platform_data;
+	if (!inf || !inf->smart_update) {
+		pr_err("%s: not properly initialized, thread terminated\n",
+				__func__);
+		return -EINVAL;
+	}
 
 	pr_debug("%s(): task starting\n", __func__);
 
-- 
1.6.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-06  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-28 15:54 [PATCH] pxafb: fix regression from d2a34c13e7ccec5d06eafd60e6f80ea531b34668 Martin Jansa
2010-01-05 22:59 ` Andrew Morton
2010-01-06  0:18   ` Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome