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

staging: sm750fb: rename 'struct sm750_dev' variables to sm750_dev

Use consistent naming for 'struct sm750_dev' variables
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bc3d48f3
...@@ -650,21 +650,21 @@ static int sm750fb_set_drv(struct lynxfb_par *par) ...@@ -650,21 +650,21 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
{ {
int ret; int ret;
struct lynx_share *share; struct lynx_share *share;
struct sm750_dev *spec_share; struct sm750_dev *sm750_dev;
struct lynxfb_output *output; struct lynxfb_output *output;
struct lynxfb_crtc *crtc; struct lynxfb_crtc *crtc;
ret = 0; ret = 0;
share = par->share; share = par->share;
spec_share = container_of(share, struct sm750_dev, share); sm750_dev = container_of(share, struct sm750_dev, share);
output = &par->output; output = &par->output;
crtc = &par->crtc; crtc = &par->crtc;
crtc->vidmem_size = (share->dual) ? share->vidmem_size >> 1 : crtc->vidmem_size = (share->dual) ? share->vidmem_size >> 1 :
share->vidmem_size; share->vidmem_size;
/* setup crtc and output member */ /* setup crtc and output member */
spec_share->hwCursor = g_hwcursor; sm750_dev->hwCursor = g_hwcursor;
crtc->line_pad = 16; crtc->line_pad = 16;
crtc->xpanstep = 8; crtc->xpanstep = 8;
...@@ -676,7 +676,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par) ...@@ -676,7 +676,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
/* chip specific phase */ /* chip specific phase */
share->accel.de_wait = (share->revid == SM750LE_REVISION_ID) ? share->accel.de_wait = (share->revid == SM750LE_REVISION_ID) ?
hw_sm750le_deWait : hw_sm750_deWait; hw_sm750le_deWait : hw_sm750_deWait;
switch (spec_share->state.dataflow) { switch (sm750_dev->state.dataflow) {
case sm750_simul_pri: case sm750_simul_pri:
output->paths = sm750_pnc; output->paths = sm750_pnc;
crtc->channel = sm750_primary; crtc->channel = sm750_primary;
...@@ -937,25 +937,25 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) ...@@ -937,25 +937,25 @@ 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 lynx_share *share, char *src)
{ {
struct sm750_dev *spec_share; struct sm750_dev *sm750_dev;
char *opt; char *opt;
#ifdef CAP_EXPENSION #ifdef CAP_EXPENSION
char *exp_res; char *exp_res;
#endif #endif
int swap; int swap;
spec_share = container_of(share, struct sm750_dev, share); sm750_dev = container_of(share, struct sm750_dev, share);
#ifdef CAP_EXPENSIION #ifdef CAP_EXPENSIION
exp_res = NULL; exp_res = NULL;
#endif #endif
swap = 0; swap = 0;
spec_share->state.initParm.chip_clk = 0; sm750_dev->state.initParm.chip_clk = 0;
spec_share->state.initParm.mem_clk = 0; sm750_dev->state.initParm.mem_clk = 0;
spec_share->state.initParm.master_clk = 0; sm750_dev->state.initParm.master_clk = 0;
spec_share->state.initParm.powerMode = 0; sm750_dev->state.initParm.powerMode = 0;
spec_share->state.initParm.setAllEngOff = 0; sm750_dev->state.initParm.setAllEngOff = 0;
spec_share->state.initParm.resetMemory = 1; sm750_dev->state.initParm.resetMemory = 1;
/* defaultly turn g_hwcursor on for both view */ /* defaultly turn g_hwcursor on for both view */
g_hwcursor = 3; g_hwcursor = 3;
...@@ -972,13 +972,13 @@ static void sm750fb_setup(struct lynx_share *share, char *src) ...@@ -972,13 +972,13 @@ static void sm750fb_setup(struct lynx_share *share, char *src)
if (!strncmp(opt, "swap", strlen("swap"))) if (!strncmp(opt, "swap", strlen("swap")))
swap = 1; swap = 1;
else if (!strncmp(opt, "nocrt", strlen("nocrt"))) else if (!strncmp(opt, "nocrt", strlen("nocrt")))
spec_share->state.nocrt = 1; sm750_dev->state.nocrt = 1;
else if (!strncmp(opt, "36bit", strlen("36bit"))) else if (!strncmp(opt, "36bit", strlen("36bit")))
spec_share->state.pnltype = sm750_doubleTFT; sm750_dev->state.pnltype = sm750_doubleTFT;
else if (!strncmp(opt, "18bit", strlen("18bit"))) else if (!strncmp(opt, "18bit", strlen("18bit")))
spec_share->state.pnltype = sm750_dualTFT; sm750_dev->state.pnltype = sm750_dualTFT;
else if (!strncmp(opt, "24bit", strlen("24bit"))) else if (!strncmp(opt, "24bit", strlen("24bit")))
spec_share->state.pnltype = sm750_24TFT; sm750_dev->state.pnltype = sm750_24TFT;
#ifdef CAP_EXPANSION #ifdef CAP_EXPANSION
else if (!strncmp(opt, "exp:", strlen("exp:"))) else if (!strncmp(opt, "exp:", strlen("exp:")))
exp_res = opt + strlen("exp:"); exp_res = opt + strlen("exp:");
...@@ -1003,10 +1003,10 @@ static void sm750fb_setup(struct lynx_share *share, char *src) ...@@ -1003,10 +1003,10 @@ static void sm750fb_setup(struct lynx_share *share, char *src)
} }
#ifdef CAP_EXPANSION #ifdef CAP_EXPANSION
if (getExpRes(exp_res, if (getExpRes(exp_res,
&spec_share->state.xLCD, &sm750_dev->state.xLCD,
&spec_share->state.yLCD)) { &sm750_dev->state.yLCD)) {
/* seems exp_res is not valid */ /* seems exp_res is not valid */
spec_share->state.xLCD = spec_share->state.yLCD = 0; sm750_dev->state.xLCD = sm750_dev->state.yLCD = 0;
} }
#endif #endif
...@@ -1014,20 +1014,20 @@ static void sm750fb_setup(struct lynx_share *share, char *src) ...@@ -1014,20 +1014,20 @@ static void sm750fb_setup(struct lynx_share *share, char *src)
if (share->revid != SM750LE_REVISION_ID) { if (share->revid != SM750LE_REVISION_ID) {
if (share->dual) { if (share->dual) {
if (swap) if (swap)
spec_share->state.dataflow = sm750_dual_swap; sm750_dev->state.dataflow = sm750_dual_swap;
else else
spec_share->state.dataflow = sm750_dual_normal; sm750_dev->state.dataflow = sm750_dual_normal;
} else { } else {
if (swap) if (swap)
spec_share->state.dataflow = sm750_simul_sec; sm750_dev->state.dataflow = sm750_simul_sec;
else else
spec_share->state.dataflow = sm750_simul_pri; sm750_dev->state.dataflow = sm750_simul_pri;
} }
} else { } else {
/* SM750LE only have one crt channel */ /* SM750LE only have one crt channel */
spec_share->state.dataflow = sm750_simul_sec; sm750_dev->state.dataflow = sm750_simul_sec;
/* sm750le do not have complex attributes */ /* sm750le do not have complex attributes */
spec_share->state.nocrt = 0; sm750_dev->state.nocrt = 0;
} }
} }
...@@ -1037,7 +1037,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, ...@@ -1037,7 +1037,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
struct fb_info *info[] = {NULL, NULL}; struct fb_info *info[] = {NULL, NULL};
struct lynx_share *share = NULL; struct lynx_share *share = NULL;
struct sm750_dev *spec_share = NULL; struct sm750_dev *sm750_dev = NULL;
size_t spec_offset = 0; size_t spec_offset = 0;
int fbidx; int fbidx;
...@@ -1053,14 +1053,14 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, ...@@ -1053,14 +1053,14 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
*/ */
spec_offset = offsetof(struct sm750_dev, share); spec_offset = offsetof(struct sm750_dev, share);
spec_share = kzalloc(sizeof(*spec_share), GFP_KERNEL); sm750_dev = kzalloc(sizeof(*sm750_dev), GFP_KERNEL);
if (!spec_share) { if (!sm750_dev) {
pr_err("Could not allocate memory for share.\n"); pr_err("Could not allocate memory for share.\n");
goto err_share; goto err_share;
} }
/* setting share structure */ /* setting share structure */
share = (struct lynx_share *)(&(spec_share->share)); share = (struct lynx_share *)(&(sm750_dev->share));
share->fbinfo[0] = share->fbinfo[1] = NULL; share->fbinfo[0] = share->fbinfo[1] = NULL;
share->devid = pdev->device; share->devid = pdev->device;
share->revid = pdev->revision; share->revid = pdev->revision;
...@@ -1171,7 +1171,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, ...@@ -1171,7 +1171,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
framebuffer_release(info[0]); framebuffer_release(info[0]);
err_info0_alloc: err_info0_alloc:
err_map: err_map:
kfree(spec_share); kfree(sm750_dev);
err_share: err_share:
err_enable: err_enable:
return -ENODEV; return -ENODEV;
...@@ -1181,7 +1181,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev) ...@@ -1181,7 +1181,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
{ {
struct fb_info *info; struct fb_info *info;
struct lynx_share *share; struct lynx_share *share;
void *spec_share; void *sm750_dev;
struct lynxfb_par *par; struct lynxfb_par *par;
int cnt; int cnt;
...@@ -1202,9 +1202,9 @@ static void lynxfb_pci_remove(struct pci_dev *pdev) ...@@ -1202,9 +1202,9 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
iounmap(share->pvReg); iounmap(share->pvReg);
iounmap(share->pvMem); iounmap(share->pvMem);
spec_share = container_of(share, struct sm750_dev, share); sm750_dev = container_of(share, struct sm750_dev, share);
kfree(g_settings); kfree(g_settings);
kfree(spec_share); kfree(sm750_dev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
} }
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev) int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev)
{ {
int ret; int ret;
struct sm750_dev *spec_share; struct sm750_dev *sm750_dev;
spec_share = container_of(share, struct 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);
...@@ -93,11 +93,11 @@ int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev) ...@@ -93,11 +93,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 lynx_share *share, struct pci_dev *pdev)
{ {
struct sm750_dev *spec_share; struct sm750_dev *sm750_dev;
struct init_status *parm; struct init_status *parm;
spec_share = container_of(share, struct sm750_dev, share); sm750_dev = container_of(share, struct sm750_dev, share);
parm = &spec_share->state.initParm; parm = &sm750_dev->state.initParm;
if (parm->chip_clk == 0) if (parm->chip_clk == 0)
parm->chip_clk = (getChipType() == SM750LE) ? parm->chip_clk = (getChipType() == SM750LE) ?
DEFAULT_SM750LE_CHIP_CLOCK : DEFAULT_SM750LE_CHIP_CLOCK :
...@@ -108,7 +108,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev) ...@@ -108,7 +108,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
if (parm->master_clk == 0) if (parm->master_clk == 0)
parm->master_clk = parm->chip_clk/3; parm->master_clk = parm->chip_clk/3;
ddk750_initHw((initchip_param_t *)&spec_share->state.initParm); ddk750_initHw((initchip_param_t *)&sm750_dev->state.initParm);
/* for sm718,open pci burst */ /* for sm718,open pci burst */
if (share->devid == 0x718) { if (share->devid == 0x718) {
POKE32(SYSTEM_CTRL, POKE32(SYSTEM_CTRL,
...@@ -117,7 +117,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev) ...@@ -117,7 +117,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
if (getChipType() != SM750LE) { if (getChipType() != SM750LE) {
/* does user need CRT ?*/ /* does user need CRT ?*/
if (spec_share->state.nocrt) { if (sm750_dev->state.nocrt) {
POKE32(MISC_CTRL, POKE32(MISC_CTRL,
FIELD_SET(PEEK32(MISC_CTRL), FIELD_SET(PEEK32(MISC_CTRL),
MISC_CTRL, MISC_CTRL,
...@@ -139,7 +139,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev) ...@@ -139,7 +139,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
DPMS, VPHP)); DPMS, VPHP));
} }
switch (spec_share->state.pnltype) { switch (sm750_dev->state.pnltype) {
case sm750_doubleTFT: case sm750_doubleTFT:
case sm750_24TFT: case sm750_24TFT:
case sm750_dualTFT: case sm750_dualTFT:
...@@ -147,7 +147,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev) ...@@ -147,7 +147,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
FIELD_VALUE(PEEK32(PANEL_DISPLAY_CTRL), FIELD_VALUE(PEEK32(PANEL_DISPLAY_CTRL),
PANEL_DISPLAY_CTRL, PANEL_DISPLAY_CTRL,
TFT_DISP, TFT_DISP,
spec_share->state.pnltype)); sm750_dev->state.pnltype));
break; break;
} }
} else { } else {
......
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