struct fb_info *fbi = NULL;
for (i = 0; i < num_registered_fb; i++) {
- mxc_fbi =
- ((struct mxcfb_info *)(registered_fb[i]->par));
+ mxc_fbi = registered_fb[i]->par;
if ((mxc_fbi->ipu_ch == ipu_ch) &&
(mxc_fbi->ipu_id == ipu_id)) {
static int _setup_disp_channel1(struct fb_info *fbi)
{
ipu_channel_params_t params;
- struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+ struct mxcfb_info *mxc_fbi = fbi->par;
memset(¶ms, 0, sizeof(params));
static int _setup_disp_channel2(struct fb_info *fbi)
{
int retval = 0;
- struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+ struct mxcfb_info *mxc_fbi = fbi->par;
int fb_stride;
unsigned long base;
unsigned int fr_xoff, fr_yoff, fr_w, fr_h;
int retval = 0;
u32 mem_len, alpha_mem_len;
ipu_di_signal_cfg_t sig_cfg;
- struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+ struct mxcfb_info *mxc_fbi = fbi->par;
int16_t ov_pos_x = 0, ov_pos_y = 0;
int ov_pos_ret = 0;
}
if (mxc_fbi->ovfbi)
- mxc_fbi_fg = (struct mxcfb_info *)mxc_fbi->ovfbi->par;
+ mxc_fbi_fg = mxc_fbi->ovfbi->par;
if (mxc_fbi->ovfbi && mxc_fbi_fg)
if (mxc_fbi_fg->next_blank == FB_BLANK_UNBLANK)
* the same to kernel fb pixel format.
*/
if (mxc_fbi->late_init)
- memset((char *)fbi->screen_base, 0, fbi->fix.smem_len);
+ memset(fbi->screen_base, 0, fbi->fix.smem_len);
mxc_fbi->first_set_par = false;
}
int retval, tmp;
ipu_channel_t old_ch;
struct fb_info *ovfbi;
- struct mxcfb_info *mxc_fbi_from = (struct mxcfb_info *)fbi_from->par;
- struct mxcfb_info *mxc_fbi_to = (struct mxcfb_info *)fbi_to->par;
+ struct mxcfb_info *mxc_fbi_from = fbi_from->par;
+ struct mxcfb_info *mxc_fbi_to = fbi_to->par;
if (both_on) {
ipu_disable_channel(mxc_fbi_to->ipu, mxc_fbi_to->ipu_ch, true);
int i;
int swap_mode;
ipu_channel_t ch_to;
- struct mxcfb_info *mxc_fbi_from = (struct mxcfb_info *)fbi_from->par;
+ struct mxcfb_info *mxc_fbi_from = fbi_from->par;
struct fb_info *fbi_to = NULL;
struct mxcfb_info *mxc_fbi_to;
fbi_to = found_registered_fb(ch_to, mxc_fbi_from->ipu_id);
if (!fbi_to)
return -1;
- mxc_fbi_to = (struct mxcfb_info *)fbi_to->par;
+ mxc_fbi_to = fbi_to->par;
ipu_clear_irq(mxc_fbi_from->ipu, mxc_fbi_from->ipu_ch_irq);
ipu_clear_irq(mxc_fbi_to->ipu, mxc_fbi_to->ipu_ch_irq);
{
u32 vtotal;
u32 htotal;
- struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)info->par;
+ struct mxcfb_info *mxc_fbi = info->par;
if (var->xres == 0 || var->yres == 0)
{
int retval = 0;
int __user *argp = (void __user *)arg;
- struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par;
+ struct mxcfb_info *mxc_fbi = fbi->par;
switch (cmd) {
case MXCFB_SET_GBL_ALPHA:
{
struct mxcfb_gbl_alpha ga;
- if (copy_from_user(&ga, (void *)arg, sizeof(ga))) {
+ if (copy_from_user(&ga, argp, sizeof(ga))) {
retval = -EFAULT;
break;
}
bool bad_pixfmt =
ipu_ch_param_bad_alpha_pos(fbi_to_pixfmt(fbi));
- if (copy_from_user(&la, (void *)arg, sizeof(la))) {
+ if (copy_from_user(&la, argp, sizeof(la))) {
retval = -EFAULT;
break;
}
la.alpha_phy_addr0 = mxc_fbi->alpha_phy_addr0;
la.alpha_phy_addr1 = mxc_fbi->alpha_phy_addr1;
- if (copy_to_user((void *)arg, &la, sizeof(la))) {
+ if (copy_to_user(argp, &la, sizeof(la))) {
retval = -EFAULT;
break;
}
case MXCFB_SET_CLR_KEY:
{
struct mxcfb_color_key key;
- if (copy_from_user(&key, (void *)arg, sizeof(key))) {
+ if (copy_from_user(&key, argp, sizeof(key))) {
retval = -EFAULT;
break;
}
case MXCFB_SET_GAMMA:
{
struct mxcfb_gamma gamma;
- if (copy_from_user(&gamma, (void *)arg, sizeof(gamma))) {
+ if (copy_from_user(&gamma, argp, sizeof(gamma))) {
retval = -EFAULT;
break;
}
break;
}
- if (copy_from_user(&pos, (void *)arg, sizeof(pos))) {
+ if (copy_from_user(&pos, argp, sizeof(pos))) {
retval = -EFAULT;
break;
}
retval = ipu_disp_set_window_pos(mxc_fbi->ipu, mxc_fbi->ipu_ch,
pos.x, pos.y);
- if (copy_to_user((void *)arg, &pos, sizeof(pos))) {
+ if (copy_to_user(argp, &pos, sizeof(pos))) {
retval = -EFAULT;
break;
}
{
struct mxcfb_csc_matrix csc;
- if (copy_from_user(&csc, (void *) arg, sizeof(csc)))
+ if (copy_from_user(&csc, argp, sizeof(csc)))
return -EFAULT;
if ((mxc_fbi->ipu_ch != MEM_FG_SYNC) &&
ret = -ENOMEM;
goto init_ovfbinfo_failed;
}
- mxcfbi_fg = (struct mxcfb_info *)ovfbi->par;
+ mxcfbi_fg = ovfbi->par;
mxcfbi_fg->ipu = ipu_get_soc(mxcfbi_bg->ipu_id);
if (IS_ERR(mxcfbi_fg->ipu)) {
static void mxcfb_unsetup_overlay(struct fb_info *fbi_bg)
{
- struct mxcfb_info *mxcfbi_bg = (struct mxcfb_info *)fbi_bg->par;
+ struct mxcfb_info *mxcfbi_bg = fbi_bg->par;
struct fb_info *ovfbi = mxcfbi_bg->ovfbi;
mxcfb_unregister(ovfbi);
if (ret)
goto get_fb_option_failed;
- mxcfbi = (struct mxcfb_info *)fbi->par;
+ mxcfbi = fbi->par;
mxcfbi->ipu_int_clk = plat_data->int_clk;
mxcfbi->late_init = plat_data->late_init;
mxcfbi->first_set_par = true;