mirror of https://gitee.com/openkylin/linux.git
staging: sm750fb: replace lynx_share with sm750_dev in function calls
Use sm750_dev rather than lynx_share as parameter for hw_sm750_map, hw_sm750_inithw and hw_sm750_initAccel functions. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
142de763c0
commit
700591a9ad
|
@ -444,6 +444,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
struct fb_info *info;
|
struct fb_info *info;
|
||||||
struct lynx_share *share;
|
struct lynx_share *share;
|
||||||
|
struct sm750_dev *sm750_dev;
|
||||||
|
|
||||||
struct lynxfb_par *par;
|
struct lynxfb_par *par;
|
||||||
struct lynxfb_crtc *crtc;
|
struct lynxfb_crtc *crtc;
|
||||||
|
@ -453,6 +454,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
share = pci_get_drvdata(pdev);
|
share = pci_get_drvdata(pdev);
|
||||||
|
sm750_dev = container_of(share, struct sm750_dev, share);
|
||||||
|
|
||||||
console_lock();
|
console_lock();
|
||||||
|
|
||||||
|
@ -472,7 +474,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
hw_sm750_inithw(share, pdev);
|
hw_sm750_inithw(sm750_dev, pdev);
|
||||||
|
|
||||||
info = share->fbinfo[0];
|
info = share->fbinfo[0];
|
||||||
|
|
||||||
|
@ -931,16 +933,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* chip specific g_option configuration routine */
|
/* chip specific g_option configuration routine */
|
||||||
static void sm750fb_setup(struct lynx_share *share, char *src)
|
static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
|
||||||
{
|
{
|
||||||
struct sm750_dev *sm750_dev;
|
struct lynx_share *share = &sm750_dev->share;
|
||||||
char *opt;
|
char *opt;
|
||||||
#ifdef CAP_EXPENSION
|
#ifdef CAP_EXPENSION
|
||||||
char *exp_res;
|
char *exp_res;
|
||||||
#endif
|
#endif
|
||||||
int swap;
|
int swap;
|
||||||
|
|
||||||
sm750_dev = container_of(share, struct sm750_dev, share);
|
|
||||||
#ifdef CAP_EXPENSIION
|
#ifdef CAP_EXPENSIION
|
||||||
exp_res = NULL;
|
exp_res = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1086,10 +1087,10 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call chip specific setup routine */
|
/* call chip specific setup routine */
|
||||||
sm750fb_setup(share, g_settings);
|
sm750fb_setup(sm750_dev, g_settings);
|
||||||
|
|
||||||
/* call chip specific mmap routine */
|
/* call chip specific mmap routine */
|
||||||
if (hw_sm750_map(share, pdev)) {
|
if (hw_sm750_map(sm750_dev, pdev)) {
|
||||||
pr_err("Memory map failed\n");
|
pr_err("Memory map failed\n");
|
||||||
goto err_map;
|
goto err_map;
|
||||||
}
|
}
|
||||||
|
@ -1105,7 +1106,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
|
||||||
pci_set_drvdata(pdev, share);
|
pci_set_drvdata(pdev, share);
|
||||||
|
|
||||||
/* call chipInit routine */
|
/* call chipInit routine */
|
||||||
hw_sm750_inithw(share, pdev);
|
hw_sm750_inithw(sm750_dev, pdev);
|
||||||
|
|
||||||
/* allocate frame buffer info structor according to g_dualview */
|
/* allocate frame buffer info structor according to g_dualview */
|
||||||
fbidx = 0;
|
fbidx = 0;
|
||||||
|
|
|
@ -196,9 +196,9 @@ static inline unsigned long ps_to_hz(unsigned int psvalue)
|
||||||
return (unsigned long)numerator;
|
return (unsigned long)numerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev);
|
int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev);
|
||||||
int hw_sm750_inithw(struct lynx_share*, struct pci_dev *);
|
int hw_sm750_inithw(struct sm750_dev*, struct pci_dev *);
|
||||||
void hw_sm750_initAccel(struct lynx_share *);
|
void hw_sm750_initAccel(struct sm750_dev *);
|
||||||
int hw_sm750_deWait(void);
|
int hw_sm750_deWait(void);
|
||||||
int hw_sm750le_deWait(void);
|
int hw_sm750le_deWait(void);
|
||||||
|
|
||||||
|
|
|
@ -24,13 +24,11 @@
|
||||||
#include "ddk750.h"
|
#include "ddk750.h"
|
||||||
#include "sm750_accel.h"
|
#include "sm750_accel.h"
|
||||||
|
|
||||||
int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev)
|
int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct sm750_dev *sm750_dev;
|
struct lynx_share *share = &sm750_dev->share;
|
||||||
|
|
||||||
|
|
||||||
sm750_dev = container_of(share, struct sm750_dev, share);
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
share->vidreg_start = pci_resource_start(pdev, 1);
|
share->vidreg_start = pci_resource_start(pdev, 1);
|
||||||
|
@ -91,12 +89,11 @@ int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
|
int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
struct sm750_dev *sm750_dev;
|
struct lynx_share *share = &sm750_dev->share;
|
||||||
struct init_status *parm;
|
struct init_status *parm;
|
||||||
|
|
||||||
sm750_dev = container_of(share, struct sm750_dev, share);
|
|
||||||
parm = &sm750_dev->initParm;
|
parm = &sm750_dev->initParm;
|
||||||
if (parm->chip_clk == 0)
|
if (parm->chip_clk == 0)
|
||||||
parm->chip_clk = (getChipType() == SM750LE) ?
|
parm->chip_clk = (getChipType() == SM750LE) ?
|
||||||
|
@ -175,7 +172,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
|
||||||
|
|
||||||
/* init 2d engine */
|
/* init 2d engine */
|
||||||
if (!share->accel_off)
|
if (!share->accel_off)
|
||||||
hw_sm750_initAccel(share);
|
hw_sm750_initAccel(sm750_dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -464,8 +461,9 @@ int hw_sm750_setBLANK(struct lynxfb_output *output, int blank)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void hw_sm750_initAccel(struct lynx_share *share)
|
void hw_sm750_initAccel(struct sm750_dev *sm750_dev)
|
||||||
{
|
{
|
||||||
|
struct lynx_share *share = &sm750_dev->share;
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
enable2DEngine(1);
|
enable2DEngine(1);
|
||||||
|
|
Loading…
Reference in New Issue