aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-09-17 15:00:14 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-09-30 06:06:00 -0400
commit1f17a0fa681326f726505f5a662caf07f0d098e2 (patch)
tree2ebf6374d2783c9f52b73374b3f95a21ecf0d12a
parentb232e94d2842abb893ccb0a870a8d7a920f87df4 (diff)
video: fbdev: stifb.c: use container_of to resolve stifb_info from fb_info
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/fbdev/stifb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index cfe8a2f905c5..86621fabbb8b 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -918,7 +918,7 @@ static int
918stifb_setcolreg(u_int regno, u_int red, u_int green, 918stifb_setcolreg(u_int regno, u_int red, u_int green,
919 u_int blue, u_int transp, struct fb_info *info) 919 u_int blue, u_int transp, struct fb_info *info)
920{ 920{
921 struct stifb_info *fb = (struct stifb_info *) info; 921 struct stifb_info *fb = container_of(info, struct stifb_info, info);
922 u32 color; 922 u32 color;
923 923
924 if (regno >= NR_PALETTE) 924 if (regno >= NR_PALETTE)
@@ -978,7 +978,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green,
978static int 978static int
979stifb_blank(int blank_mode, struct fb_info *info) 979stifb_blank(int blank_mode, struct fb_info *info)
980{ 980{
981 struct stifb_info *fb = (struct stifb_info *) info; 981 struct stifb_info *fb = container_of(info, struct stifb_info, info);
982 int enable = (blank_mode == 0) ? ENABLE : DISABLE; 982 int enable = (blank_mode == 0) ? ENABLE : DISABLE;
983 983
984 switch (fb->id) { 984 switch (fb->id) {