Skip to content

Commit

Permalink
fbdev: sh_mobile_lcdc: Rename fb operation handlers with a common prefix
Browse files Browse the repository at this point in the history
Make all fb operation handlers start with sh_mobile_lcdc_ in preparation
for the multi-plane support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  • Loading branch information
Laurent Pinchart committed Jun 20, 2012
1 parent 3281e54 commit d7ad334
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ sh_mobile_lcdc_must_reconfigure(struct sh_mobile_lcdc_chan *ch,
return true;
}

static int sh_mobile_check_var(struct fb_var_screeninfo *var,
struct fb_info *info);
static int sh_mobile_lcdc_check_var(struct fb_var_screeninfo *var,
struct fb_info *info);

static int sh_mobile_lcdc_display_notify(struct sh_mobile_lcdc_chan *ch,
enum sh_mobile_lcdc_entity_event event,
Expand Down Expand Up @@ -439,7 +439,7 @@ static int sh_mobile_lcdc_display_notify(struct sh_mobile_lcdc_chan *ch,
fb_videomode_to_var(&var, mode);
var.bits_per_pixel = info->var.bits_per_pixel;
var.grayscale = info->var.grayscale;
ret = sh_mobile_check_var(&var, info);
ret = sh_mobile_lcdc_check_var(&var, info);
break;
}

Expand Down Expand Up @@ -585,7 +585,7 @@ static irqreturn_t sh_mobile_lcdc_irq(int irq, void *data)
return IRQ_HANDLED;
}

static int sh_mobile_wait_for_vsync(struct sh_mobile_lcdc_chan *ch)
static int sh_mobile_lcdc_wait_for_vsync(struct sh_mobile_lcdc_chan *ch)
{
unsigned long ldintr;
int ret;
Expand Down Expand Up @@ -686,7 +686,7 @@ static void sh_mobile_lcdc_geometry(struct sh_mobile_lcdc_chan *ch)
}

/*
* __sh_mobile_lcdc_start - Configure and tart the LCDC
* __sh_mobile_lcdc_start - Configure and start the LCDC
* @priv: LCDC device
*
* Configure all enabled channels and start the LCDC device. All external
Expand Down Expand Up @@ -1035,8 +1035,8 @@ static void sh_mobile_lcdc_imageblit(struct fb_info *info,
sh_mobile_lcdc_deferred_io_touch(info);
}

static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct sh_mobile_lcdc_chan *ch = info->par;
struct sh_mobile_lcdc_priv *priv = ch->lcdc;
Expand Down Expand Up @@ -1099,14 +1099,15 @@ static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var,
return 0;
}

static int sh_mobile_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
static int sh_mobile_lcdc_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
struct sh_mobile_lcdc_chan *ch = info->par;
int retval;

switch (cmd) {
case FBIO_WAITFORVSYNC:
retval = sh_mobile_wait_for_vsync(info->par);
retval = sh_mobile_lcdc_wait_for_vsync(ch);
break;

default:
Expand Down Expand Up @@ -1158,7 +1159,7 @@ static void sh_mobile_fb_reconfig(struct fb_info *info)
* Locking: both .fb_release() and .fb_open() are called with info->lock held if
* user == 1, or with console sem held, if user == 0.
*/
static int sh_mobile_release(struct fb_info *info, int user)
static int sh_mobile_lcdc_release(struct fb_info *info, int user)
{
struct sh_mobile_lcdc_chan *ch = info->par;

Expand All @@ -1179,7 +1180,7 @@ static int sh_mobile_release(struct fb_info *info, int user)
return 0;
}

static int sh_mobile_open(struct fb_info *info, int user)
static int sh_mobile_lcdc_open(struct fb_info *info, int user)
{
struct sh_mobile_lcdc_chan *ch = info->par;

Expand All @@ -1192,7 +1193,8 @@ static int sh_mobile_open(struct fb_info *info, int user)
return 0;
}

static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
static int sh_mobile_lcdc_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct sh_mobile_lcdc_chan *ch = info->par;
struct sh_mobile_lcdc_priv *p = ch->lcdc;
Expand Down Expand Up @@ -1313,7 +1315,7 @@ static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *in
return 0;
}

static int sh_mobile_set_par(struct fb_info *info)
static int sh_mobile_lcdc_set_par(struct fb_info *info)
{
struct sh_mobile_lcdc_chan *ch = info->par;
int ret;
Expand Down Expand Up @@ -1383,8 +1385,8 @@ static int sh_mobile_lcdc_blank(int blank, struct fb_info *info)
* mode will reenable the clocks and update the screen in time,
* so it does not need this. */
if (!info->fbdefio) {
sh_mobile_wait_for_vsync(ch);
sh_mobile_wait_for_vsync(ch);
sh_mobile_lcdc_wait_for_vsync(ch);
sh_mobile_lcdc_wait_for_vsync(ch);
}
sh_mobile_lcdc_clk_off(p);
}
Expand All @@ -1402,12 +1404,12 @@ static struct fb_ops sh_mobile_lcdc_ops = {
.fb_copyarea = sh_mobile_lcdc_copyarea,
.fb_imageblit = sh_mobile_lcdc_imageblit,
.fb_blank = sh_mobile_lcdc_blank,
.fb_pan_display = sh_mobile_fb_pan_display,
.fb_ioctl = sh_mobile_ioctl,
.fb_open = sh_mobile_open,
.fb_release = sh_mobile_release,
.fb_check_var = sh_mobile_check_var,
.fb_set_par = sh_mobile_set_par,
.fb_pan_display = sh_mobile_lcdc_pan,
.fb_ioctl = sh_mobile_lcdc_ioctl,
.fb_open = sh_mobile_lcdc_open,
.fb_release = sh_mobile_lcdc_release,
.fb_check_var = sh_mobile_lcdc_check_var,
.fb_set_par = sh_mobile_lcdc_set_par,
};

static void
Expand Down Expand Up @@ -1537,7 +1539,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
else
var->grayscale = ch->format->fourcc;

ret = sh_mobile_check_var(var, info);
ret = sh_mobile_lcdc_check_var(var, info);
if (ret)
return ret;

Expand Down

0 comments on commit d7ad334

Please sign in to comment.