diff options
author | Javier M. Mellid <jmunhoz@igalia.com> | 2012-06-27 12:10:15 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-06 23:08:58 (GMT) |
commit | 501b02e4d6a3c29ce4e7cef9a5a1a21f236c3c63 (patch) | |
tree | 38bc2212affdd40c23e4182be0f3558efa49104a /drivers | |
parent | 7813296d2259dd5056278bcf8b2fdeaaf8499f1f (diff) | |
download | linux-fsl-qoriq-501b02e4d6a3c29ce4e7cef9a5a1a21f236c3c63.tar.xz |
staging: sm7xxfb: erase hardcode cast between smtcfb_info and fb_info
This patch erases hardcode cast between smtcfb_info and fb_info in order
to get a more robust and less rigid smtcfb_info structure. fb_info
doesn't need to be the first field in smtcfb_info after this patch.
Tested with SM712.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/sm7xxfb/sm7xxfb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c index c603e8c..e3511ec 100644 --- a/drivers/staging/sm7xxfb/sm7xxfb.c +++ b/drivers/staging/sm7xxfb/sm7xxfb.c @@ -40,8 +40,8 @@ struct screen_info smtc_screen_info; * Private structure */ struct smtcfb_info { - struct fb_info fb; struct pci_dev *pdev; + struct fb_info fb; u16 chip_id; u8 chip_rev_id; @@ -328,9 +328,11 @@ static int smtc_blank(int blank_mode, struct fb_info *info) static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned trans, struct fb_info *info) { - struct smtcfb_info *sfb = (struct smtcfb_info *)info; + struct smtcfb_info *sfb; u32 val; + sfb = info->par; + if (regno > 255) return 1; @@ -623,9 +625,7 @@ static int smtc_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static int smtc_set_par(struct fb_info *info) { - struct smtcfb_info *sfb = (struct smtcfb_info *)info; - - smtcfb_setmode(sfb); + smtcfb_setmode(info->par); return 0; } |