3d79409233079296a9a874c0e04364246557954b
[openembedded.git] /
1 From b448a4e11127012a96bae8689e019879fbb8470f Mon Sep 17 00:00:00 2001
2 From: Martin Jansa <Martin.Jansa@gmail.com>
3 Date: Mon, 28 Dec 2009 16:45:33 +0100
4 Subject: [PATCH] pxafb: fix regression from d2a34c13e7ccec5d06eafd60e6f80ea531b34668
5
6 fbi->dev->platform_data is void * and gcc does not allow to access
7 !fbi->dev->platform_data->smart_update without cast platform_data to
8 (struct pxafb_mach_info) or assignment as used in this patch.
9
10 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
11 ---
12  drivers/video/pxafb.c |    7 ++++++-
13  1 files changed, 6 insertions(+), 1 deletions(-)
14
15 diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
16 index 415858b..241468c 100644
17 --- a/drivers/video/pxafb.c
18 +++ b/drivers/video/pxafb.c
19 @@ -1223,12 +1223,17 @@ static int pxafb_smart_thread(void *arg)
20         struct pxafb_info *fbi = arg;
21         struct pxafb_mach_info *inf;
22  
23 -       if (!fbi || !fbi->dev->platform_data->smart_update) {
24 +       if (!fbi) {
25                 pr_err("%s: not properly initialized, thread terminated\n",
26                                 __func__);
27                 return -EINVAL;
28         }
29         inf = fbi->dev->platform_data;
30 +       if (!inf || !inf->smart_update) {
31 +               pr_err("%s: not properly initialized, thread terminated\n",
32 +                               __func__);
33 +               return -EINVAL;
34 +       }
35  
36         pr_debug("%s(): task starting\n", __func__);
37  
38 -- 
39 1.6.6
40