Commit f11fa2a9 authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_par

Use sm750_dev instead of lynx_share in the private data of the
frambuffer device.
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c9634191
...@@ -173,7 +173,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info, ...@@ -173,7 +173,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
return; return;
par = info->par; par = info->par;
share = par->share; share = &par->dev->share;
/* /*
* each time 2d function begin to work,below three variable always need * each time 2d function begin to work,below three variable always need
...@@ -211,7 +211,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info, ...@@ -211,7 +211,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info,
unsigned int base, pitch, Bpp; unsigned int base, pitch, Bpp;
par = info->par; par = info->par;
share = par->share; share = &par->dev->share;
/* /*
* each time 2d function begin to work,below three variable always need * each time 2d function begin to work,below three variable always need
...@@ -245,7 +245,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info, ...@@ -245,7 +245,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
struct lynx_share *share; struct lynx_share *share;
par = info->par; par = info->par;
share = par->share; share = &par->dev->share;
/* /*
* each time 2d function begin to work,below three variable always need * each time 2d function begin to work,below three variable always need
* be set, seems we can put them together in some place * be set, seems we can put them together in some place
...@@ -316,7 +316,7 @@ static int lynxfb_ops_set_par(struct fb_info *info) ...@@ -316,7 +316,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
ret = 0; ret = 0;
par = info->par; par = info->par;
share = par->share; share = &par->dev->share;
crtc = &par->crtc; crtc = &par->crtc;
output = &par->output; output = &par->output;
var = &info->var; var = &info->var;
...@@ -516,7 +516,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var, ...@@ -516,7 +516,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
par = info->par; par = info->par;
crtc = &par->crtc; crtc = &par->crtc;
output = &par->output; output = &par->output;
share = par->share; share = &par->dev->share;
pr_debug("check var:%dx%d-%d\n", pr_debug("check var:%dx%d-%d\n",
var->xres, var->xres,
...@@ -652,8 +652,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par) ...@@ -652,8 +652,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
ret = 0; ret = 0;
share = par->share; sm750_dev = par->dev;
sm750_dev = container_of(share, struct sm750_dev, share); share = &sm750_dev->share;
output = &par->output; output = &par->output;
crtc = &par->crtc; crtc = &par->crtc;
...@@ -762,7 +762,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) ...@@ -762,7 +762,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
ret = 0; ret = 0;
par = (struct lynxfb_par *)info->par; par = (struct lynxfb_par *)info->par;
share = par->share; share = &par->dev->share;
crtc = &par->crtc; crtc = &par->crtc;
output = &par->output; output = &par->output;
var = &info->var; var = &info->var;
...@@ -1124,7 +1124,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, ...@@ -1124,7 +1124,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
pr_info("framebuffer #%d alloc okay\n", fbidx); pr_info("framebuffer #%d alloc okay\n", fbidx);
share->fbinfo[fbidx] = info[fbidx]; share->fbinfo[fbidx] = info[fbidx];
par = info[fbidx]->par; par = info[fbidx]->par;
par->share = share; par->dev = sm750_dev;
/* set fb_info structure */ /* set fb_info structure */
if (lynxfb_set_fbinfo(info[fbidx], fbidx)) { if (lynxfb_set_fbinfo(info[fbidx], fbidx)) {
......
...@@ -185,7 +185,7 @@ struct lynxfb_par { ...@@ -185,7 +185,7 @@ struct lynxfb_par {
struct lynxfb_crtc crtc; struct lynxfb_crtc crtc;
struct lynxfb_output output; struct lynxfb_output output;
struct fb_info *info; struct fb_info *info;
struct lynx_share *share; struct sm750_dev *dev;
}; };
static inline unsigned long ps_to_hz(unsigned int psvalue) static inline unsigned long ps_to_hz(unsigned int psvalue)
......
...@@ -234,9 +234,9 @@ int hw_sm750_output_setMode(struct lynxfb_output *output, ...@@ -234,9 +234,9 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, struct fb_var_screeninfo *var) int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, struct fb_var_screeninfo *var)
{ {
struct lynx_share *share; struct lynx_share *share;
struct lynxfb_par *par = container_of(crtc, struct lynxfb_par, crtc);
share = &par->dev->share;
share = container_of(crtc, struct lynxfb_par, crtc)->share;
switch (var->bits_per_pixel) { switch (var->bits_per_pixel) {
case 8: case 8:
...@@ -274,7 +274,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, ...@@ -274,7 +274,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
ret = 0; ret = 0;
par = container_of(crtc, struct lynxfb_par, crtc); par = container_of(crtc, struct lynxfb_par, crtc);
share = par->share; share = &par->dev->share;
if (!share->accel_off) { if (!share->accel_off) {
/* set 2d engine pixel format according to mode bpp */ /* set 2d engine pixel format according to mode bpp */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment