mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
This commit is contained in:
parent
b232e94d28
commit
1f17a0fa68
1 changed files with 2 additions and 2 deletions
|
|
@ -918,7 +918,7 @@ static int
|
|||
stifb_setcolreg(u_int regno, u_int red, u_int green,
|
||||
u_int blue, u_int transp, struct fb_info *info)
|
||||
{
|
||||
struct stifb_info *fb = (struct stifb_info *) info;
|
||||
struct stifb_info *fb = container_of(info, struct stifb_info, info);
|
||||
u32 color;
|
||||
|
||||
if (regno >= NR_PALETTE)
|
||||
|
|
@ -978,7 +978,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green,
|
|||
static int
|
||||
stifb_blank(int blank_mode, struct fb_info *info)
|
||||
{
|
||||
struct stifb_info *fb = (struct stifb_info *) info;
|
||||
struct stifb_info *fb = container_of(info, struct stifb_info, info);
|
||||
int enable = (blank_mode == 0) ? ENABLE : DISABLE;
|
||||
|
||||
switch (fb->id) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue