AnsweredAssumed Answered

C Calling convention Question

Question asked by David XY Zhou on Dec 5, 2017
Latest reply on Dec 6, 2017 by David XY Zhou

Hi,

In kernel/drivers/fbdev/mxsfb.c (line 994): defined mxsfb_ops functions

 

static struct fb_ops mxsfb_ops = {
    .owner = THIS_MODULE,
    .fb_check_var = mxsfb_check_var,
    .fb_set_par = mxsfb_set_par,
    .fb_setcolreg = mxsfb_setcolreg,
    .fb_ioctl = mxsfb_ioctl,
    .fb_blank = mxsfb_blank,
    .fb_pan_display = mxsfb_pan_display,
    .fb_mmap = mxsfb_mmap,
    .fb_fillrect = cfb_fillrect,
    .fb_copyarea = cfb_copyarea,
    .fb_imageblit = cfb_imageblit,
};

 

Line 878: defines the function:

 

static int mxsfb_blank(int blank, struct fb_info *fb_info)
{
    struct mxsfb_info *host = to_imxfb_host(fb_info);

 

    host->cur_blank = blank;

...

}

 

Line 1506: calls the function:

 

    ret = fb_blank(fb_info, FB_BLANK_UNBLANK);

Line 1591: calls the function:

    mxsfb_blank(FB_BLANK_POWERDOWN, fb_info);

 

Why the parameters are passed in with different order?

 

Thank you,

 

David Zhou

Outcomes