mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
staging: sm750fb: remove duplicate init_status structure
struct init_status duplicates struct initchip_param and is only used within the sm750fb driver. Replace the remaining users of struct init_status with struct initchip_param, remove the duplicate structure and eliminate the unnecessary cast in hw_sm750_inithw(). No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260530222432.4303-1-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a0410d5bd1
commit
523200db5c
@@ -833,11 +833,11 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
|
||||
|
||||
swap = 0;
|
||||
|
||||
sm750_dev->init_parm.chip_clk = 0;
|
||||
sm750_dev->init_parm.mem_clk = 0;
|
||||
sm750_dev->init_parm.master_clk = 0;
|
||||
sm750_dev->init_parm.chip_clock = 0;
|
||||
sm750_dev->init_parm.mem_clock = 0;
|
||||
sm750_dev->init_parm.master_clock = 0;
|
||||
sm750_dev->init_parm.power_mode = 0;
|
||||
sm750_dev->init_parm.setAllEngOff = 0;
|
||||
sm750_dev->init_parm.set_all_eng_off = 0;
|
||||
sm750_dev->init_parm.reset_memory = 1;
|
||||
|
||||
/* defaultly turn g_hwcursor on for both view */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef LYNXDRV_H_
|
||||
#define LYNXDRV_H_
|
||||
#include "ddk750_chip.h"
|
||||
|
||||
#define FB_ACCEL_SMI 0xab
|
||||
|
||||
@@ -38,15 +39,6 @@ enum sm750_path {
|
||||
sm750_pnc = 3, /* panel and crt */
|
||||
};
|
||||
|
||||
struct init_status {
|
||||
ushort power_mode;
|
||||
/* below three clocks are in unit of MHZ*/
|
||||
ushort chip_clk;
|
||||
ushort mem_clk;
|
||||
ushort master_clk;
|
||||
ushort setAllEngOff;
|
||||
ushort reset_memory;
|
||||
};
|
||||
|
||||
struct lynx_accel {
|
||||
/* base virtual address of DPR registers */
|
||||
@@ -102,7 +94,7 @@ struct sm750_dev {
|
||||
/* locks*/
|
||||
spinlock_t slock;
|
||||
|
||||
struct init_status init_parm;
|
||||
struct initchip_param init_parm;
|
||||
enum sm750_pnltype pnltype;
|
||||
enum sm750_dataflow dataflow;
|
||||
int nocrt;
|
||||
|
||||
@@ -66,20 +66,20 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
|
||||
|
||||
int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
|
||||
{
|
||||
struct init_status *parm;
|
||||
struct initchip_param *parm;
|
||||
|
||||
parm = &sm750_dev->init_parm;
|
||||
if (parm->chip_clk == 0)
|
||||
parm->chip_clk = (sm750_get_chip_type() == SM750LE) ?
|
||||
if (parm->chip_clock == 0)
|
||||
parm->chip_clock = (sm750_get_chip_type() == SM750LE) ?
|
||||
DEFAULT_SM750LE_CHIP_CLOCK :
|
||||
DEFAULT_SM750_CHIP_CLOCK;
|
||||
|
||||
if (parm->mem_clk == 0)
|
||||
parm->mem_clk = parm->chip_clk;
|
||||
if (parm->master_clk == 0)
|
||||
parm->master_clk = parm->chip_clk / 3;
|
||||
if (parm->mem_clock == 0)
|
||||
parm->mem_clock = parm->chip_clock;
|
||||
if (parm->master_clock == 0)
|
||||
parm->master_clock = parm->chip_clock / 3;
|
||||
|
||||
ddk750_init_hw((struct initchip_param *)&sm750_dev->init_parm);
|
||||
ddk750_init_hw(&sm750_dev->init_parm);
|
||||
/* for sm718, open pci burst */
|
||||
if (sm750_dev->devid == 0x718) {
|
||||
poke32(SYSTEM_CTRL,
|
||||
|
||||
Reference in New Issue
Block a user