From nobody Tue Dec 2 02:29:50 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A44833E342 for ; Wed, 19 Nov 2025 09:20:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544006; cv=none; b=aSvjGZeWJIxmUgEYFONX2q11nfrXVqSDdvwhCxXwh4lk/fEP7blpBLl8il75RVan8JEUdPhdKagi24ef0kRPNmbKTJ4VWxg2xwgOGPrEub941syo30KQjkaYSKmk4UxMqJczOaHE4PtAbVzuQV8DPTKInDo7kBnwkM5qLUiLxwI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544006; c=relaxed/simple; bh=4lMjN0zNrKJpnvTH2NUrcF9t57Agd4w1OmRfepH1XgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ETyGiqsrE+RBrQsQ+Mev+CoDVSLCOxxivkQU9wgbd/hraoa0CO9Fu/koD1w5lb1TotuB9oznY8SLvHtyLFTourhRau00InyPPkMaG53zjsdpne5ZmMPoDrF5uB7lJ9Jivrv6c95tqqBJCjpkymgyVCDfm0vDX6NOUqYr3bFwwk4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ih0ftPam; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ih0ftPam" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9B0DC2BCB4; Wed, 19 Nov 2025 09:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544005; bh=4lMjN0zNrKJpnvTH2NUrcF9t57Agd4w1OmRfepH1XgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ih0ftPamsNPzR2Q+VgwIiJMBPjulPtiDXD3WKl7bLBqdYYtjwH8A5h1molD82PYTb LSElZ1nRCCG5yIiH+QSMl+jNQLIoG2foYSA2RXdisnah4tV3Lduv+6rFisP27FKLdE LwNPWsYD4YDI6tq/FO3ZsfGIMShswncpH4GHybH0S1w1MJFMECBD1/Yi6o2CRz17yE pQ/ZYAJNlVXI2pnF1/y+oitc3NC0tWnYse2QXqAj69uFIZjnbIbFr4+QKhm4SvRuur 1a+ZgYS4+uUlr489TpYXbyjtReNCpw0HQ0aPDvu3ymHTYZN0uYiEIQTJ+ud5C8kOLd g93VjEeCakecQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 6/6] char/mwave: drop typedefs Date: Wed, 19 Nov 2025 10:19:49 +0100 Message-ID: <20251119091949.825958-7-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119091949.825958-1-jirislaby@kernel.org> References: <20251119091949.825958-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" typedefs are unnecessary here. They rather obfuscate the code than help. So drop them and use the types directly. Signed-off-by: Jiri Slaby (SUSE) --- drivers/char/mwave/3780i.c | 8 +++--- drivers/char/mwave/3780i.h | 12 ++++---- drivers/char/mwave/mwavedd.c | 34 ++++++++++------------ drivers/char/mwave/mwavedd.h | 14 ++++----- drivers/char/mwave/mwavepub.h | 22 +++++++------- drivers/char/mwave/smapi.c | 2 +- drivers/char/mwave/smapi.h | 6 ++-- drivers/char/mwave/tp3780i.c | 54 +++++++++++++++++------------------ drivers/char/mwave/tp3780i.h | 30 +++++++++---------- 9 files changed, 89 insertions(+), 93 deletions(-) diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index a1bd9dd36d21..90f93cefb21c 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c @@ -115,7 +115,7 @@ static void dsp3780I_WriteGenCfg(unsigned short usDspBa= seIO, unsigned uIndex, OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl_Save)); } =20 -int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings, +int dsp3780I_EnableDSP(struct dsp_3780i_config_settings *pSettings, unsigned short *pIrqMap, unsigned short *pDmaMap) { @@ -260,7 +260,7 @@ int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSet= tings, return 0; } =20 -int dsp3780I_DisableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings) +int dsp3780I_DisableDSP(struct dsp_3780i_config_settings *pSettings) { unsigned long flags; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; @@ -284,7 +284,7 @@ int dsp3780I_DisableDSP(DSP_3780I_CONFIG_SETTINGS * pSe= ttings) return 0; } =20 -int dsp3780I_Reset(DSP_3780I_CONFIG_SETTINGS * pSettings) +int dsp3780I_Reset(struct dsp_3780i_config_settings *pSettings) { unsigned long flags; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; @@ -317,7 +317,7 @@ int dsp3780I_Reset(DSP_3780I_CONFIG_SETTINGS * pSetting= s) } =20 =20 -int dsp3780I_Run(DSP_3780I_CONFIG_SETTINGS * pSettings) +int dsp3780I_Run(struct dsp_3780i_config_settings *pSettings) { unsigned long flags; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; diff --git a/drivers/char/mwave/3780i.h b/drivers/char/mwave/3780i.h index 95164246afd1..53dafceb20e0 100644 --- a/drivers/char/mwave/3780i.h +++ b/drivers/char/mwave/3780i.h @@ -261,7 +261,7 @@ typedef struct { * the only values maintained by the 3780i support layer are the saved UART * registers. */ -typedef struct _DSP_3780I_CONFIG_SETTINGS { +struct dsp_3780i_config_settings { =20 /* Location of base configuration register */ unsigned short usBaseConfigIO; @@ -313,16 +313,16 @@ typedef struct _DSP_3780I_CONFIG_SETTINGS { unsigned char ucSCR; /* Scratch register */ unsigned char ucDLL; /* Divisor latch, low byte */ unsigned char ucDLM; /* Divisor latch, high byte */ -} DSP_3780I_CONFIG_SETTINGS; +}; =20 =20 /* 3780i support functions */ -int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings, +int dsp3780I_EnableDSP(struct dsp_3780i_config_settings *pSettings, unsigned short *pIrqMap, unsigned short *pDmaMap); -int dsp3780I_DisableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings); -int dsp3780I_Reset(DSP_3780I_CONFIG_SETTINGS * pSettings); -int dsp3780I_Run(DSP_3780I_CONFIG_SETTINGS * pSettings); +int dsp3780I_DisableDSP(struct dsp_3780i_config_settings *pSettings); +int dsp3780I_Reset(struct dsp_3780i_config_settings *pSettings); +int dsp3780I_Run(struct dsp_3780i_config_settings *pSettings); int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void __user *pvBuffer, unsigned uCount, unsigned long ulDSPAddr); int dsp3780I_ReadAndClearDStore(unsigned short usDspBaseIO, diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c index 6ab355cfe43e..640a9cb0dd8d 100644 --- a/drivers/char/mwave/mwavedd.c +++ b/drivers/char/mwave/mwavedd.c @@ -86,13 +86,13 @@ module_param_hw(mwave_3780i_io, int, ioport, 0); module_param_hw(mwave_uart_irq, int, irq, 0); module_param_hw(mwave_uart_io, int, ioport, 0); =20 -MWAVE_DEVICE_DATA mwave_s_mdd; +struct mwave_device_data mwave_s_mdd; =20 static long mwave_ioctl(struct file *file, unsigned int iocmd, unsigned long ioarg) { unsigned int retval =3D 0; - pMWAVE_DEVICE_DATA pDrvData =3D &mwave_s_mdd; + struct mwave_device_data *pDrvData =3D &mwave_s_mdd; void __user *arg =3D (void __user *)ioarg; =20 switch (iocmd) { @@ -110,15 +110,14 @@ static long mwave_ioctl(struct file *file, unsigned i= nt iocmd, break; =09 case IOCTL_MW_DSP_ABILITIES: { - MW_ABILITIES rAbilities; + struct mw_abilities rAbilities; =09 mutex_lock(&mwave_mutex); retval =3D tp3780I_QueryAbilities(&pDrvData->rBDData, &rAbilities); mutex_unlock(&mwave_mutex); if (retval =3D=3D 0) { - if( copy_to_user(arg, &rAbilities, - sizeof(MW_ABILITIES)) ) + if (copy_to_user(arg, &rAbilities, sizeof(rAbilities))) return -EFAULT; } } @@ -126,11 +125,11 @@ static long mwave_ioctl(struct file *file, unsigned i= nt iocmd, =09 case IOCTL_MW_READ_DATA: case IOCTL_MW_READCLEAR_DATA: { - MW_READWRITE rReadData; + struct mw_readwrite rReadData; unsigned short __user *pusBuffer =3D NULL; =09 if( copy_from_user(&rReadData, arg, - sizeof(MW_READWRITE)) ) + sizeof(struct mw_readwrite)) ) return -EFAULT; pusBuffer =3D (unsigned short __user *) (rReadData.pBuf); =09 @@ -145,11 +144,10 @@ static long mwave_ioctl(struct file *file, unsigned i= nt iocmd, break; =09 case IOCTL_MW_READ_INST: { - MW_READWRITE rReadData; + struct mw_readwrite rReadData; unsigned short __user *pusBuffer =3D NULL; =09 - if( copy_from_user(&rReadData, arg, - sizeof(MW_READWRITE)) ) + if (copy_from_user(&rReadData, arg, sizeof(rReadData))) return -EFAULT; pusBuffer =3D (unsigned short __user *) (rReadData.pBuf); =09 @@ -163,11 +161,10 @@ static long mwave_ioctl(struct file *file, unsigned i= nt iocmd, break; =09 case IOCTL_MW_WRITE_DATA: { - MW_READWRITE rWriteData; + struct mw_readwrite rWriteData; unsigned short __user *pusBuffer =3D NULL; =09 - if( copy_from_user(&rWriteData, arg, - sizeof(MW_READWRITE)) ) + if (copy_from_user(&rWriteData, arg, sizeof(rWriteData))) return -EFAULT; pusBuffer =3D (unsigned short __user *) (rWriteData.pBuf); =09 @@ -181,11 +178,10 @@ static long mwave_ioctl(struct file *file, unsigned i= nt iocmd, break; =09 case IOCTL_MW_WRITE_INST: { - MW_READWRITE rWriteData; + struct mw_readwrite rWriteData; unsigned short __user *pusBuffer =3D NULL; =09 - if( copy_from_user(&rWriteData, arg, - sizeof(MW_READWRITE)) ) + if (copy_from_user(&rWriteData, arg, sizeof(rWriteData))) return -EFAULT; pusBuffer =3D (unsigned short __user *)(rWriteData.pBuf); =09 @@ -336,7 +332,7 @@ static struct miscdevice mwave_misc_dev =3D { MWAVE_MIN= OR, "mwave", &mwave_fops }; */ static void mwave_exit(void) { - pMWAVE_DEVICE_DATA pDrvData =3D &mwave_s_mdd; + struct mwave_device_data *pDrvData =3D &mwave_s_mdd; =20 if ( pDrvData->sLine >=3D 0 ) { serial8250_unregister_port(pDrvData->sLine); @@ -361,9 +357,9 @@ static int __init mwave_init(void) { int i; int retval =3D 0; - pMWAVE_DEVICE_DATA pDrvData =3D &mwave_s_mdd; + struct mwave_device_data *pDrvData =3D &mwave_s_mdd; =20 - memset(&mwave_s_mdd, 0, sizeof(MWAVE_DEVICE_DATA)); + memset(&mwave_s_mdd, 0, sizeof(mwave_s_mdd)); =20 pDrvData->bBDInitialized =3D false; pDrvData->bResourcesClaimed =3D false; diff --git a/drivers/char/mwave/mwavedd.h b/drivers/char/mwave/mwavedd.h index 453305494d12..e1da1493eec5 100644 --- a/drivers/char/mwave/mwavedd.h +++ b/drivers/char/mwave/mwavedd.h @@ -61,30 +61,30 @@ extern int mwave_3780i_io; extern int mwave_uart_irq; extern int mwave_uart_io; =20 -typedef struct _MWAVE_IPC { +struct mwave_ipc { unsigned short usIntCount; /* 0=3Dnone, 1=3Dfirst, 2=3Dgreater than 1st */ bool bIsEnabled; bool bIsHere; /* entry spin lock */ wait_queue_head_t ipc_wait_queue; -} MWAVE_IPC; +}; =20 -typedef struct _MWAVE_DEVICE_DATA { - THINKPAD_BD_DATA rBDData; /* board driver's data area */ +struct mwave_device_data { + struct thinkpad_bd_data rBDData; /* board driver's data area */ unsigned long ulIPCSource_ISR; /* IPC source bits for recently processed = intr, set during ISR processing */ unsigned long ulIPCSource_DPC; /* IPC source bits for recently processed = intr, set during DPC processing */ bool bBDInitialized; bool bResourcesClaimed; bool bDSPEnabled; bool bDSPReset; - MWAVE_IPC IPCs[16]; + struct mwave_ipc IPCs[16]; bool bMwaveDevRegistered; short sLine; int nr_registered_attrs; int device_registered; =20 -} MWAVE_DEVICE_DATA, *pMWAVE_DEVICE_DATA; +}; =20 -extern MWAVE_DEVICE_DATA mwave_s_mdd; +extern struct mwave_device_data mwave_s_mdd; =20 #endif diff --git a/drivers/char/mwave/mwavepub.h b/drivers/char/mwave/mwavepub.h index 60c961ae23b4..280327bdaa38 100644 --- a/drivers/char/mwave/mwavepub.h +++ b/drivers/char/mwave/mwavepub.h @@ -53,7 +53,7 @@ #include =20 =20 -typedef struct _MW_ABILITIES { +struct mw_abilities { unsigned long instr_per_sec; unsigned long data_size; unsigned long inst_size; @@ -63,27 +63,27 @@ typedef struct _MW_ABILITIES { unsigned long component_list[7]; char mwave_os_name[16]; char bios_task_name[16]; -} MW_ABILITIES, *pMW_ABILITIES; +}; =20 =20 -typedef struct _MW_READWRITE { +struct mw_readwrite { unsigned short usDspAddress; /* The dsp address */ unsigned long ulDataLength; /* The size in bytes of the data or user buff= er */ void __user *pBuf; /* Input:variable sized buffer */ -} MW_READWRITE, *pMW_READWRITE; +}; =20 #define IOCTL_MW_RESET _IO(MWAVE_MINOR,1) #define IOCTL_MW_RUN _IO(MWAVE_MINOR,2) -#define IOCTL_MW_DSP_ABILITIES _IOR(MWAVE_MINOR,3,MW_ABILITIES) -#define IOCTL_MW_READ_DATA _IOR(MWAVE_MINOR,4,MW_READWRITE) -#define IOCTL_MW_READCLEAR_DATA _IOR(MWAVE_MINOR,5,MW_READWRITE) -#define IOCTL_MW_READ_INST _IOR(MWAVE_MINOR,6,MW_READWRITE) -#define IOCTL_MW_WRITE_DATA _IOW(MWAVE_MINOR,7,MW_READWRITE) -#define IOCTL_MW_WRITE_INST _IOW(MWAVE_MINOR,8,MW_READWRITE) +#define IOCTL_MW_DSP_ABILITIES _IOR(MWAVE_MINOR,3,struct mw_abilities) +#define IOCTL_MW_READ_DATA _IOR(MWAVE_MINOR,4,struct mw_readwrite) +#define IOCTL_MW_READCLEAR_DATA _IOR(MWAVE_MINOR,5,struct mw_readwrite) +#define IOCTL_MW_READ_INST _IOR(MWAVE_MINOR,6,struct mw_readwrite) +#define IOCTL_MW_WRITE_DATA _IOW(MWAVE_MINOR,7,struct mw_readwrite) +#define IOCTL_MW_WRITE_INST _IOW(MWAVE_MINOR,8,struct mw_readwrite) #define IOCTL_MW_REGISTER_IPC _IOW(MWAVE_MINOR,9,int) #define IOCTL_MW_UNREGISTER_IPC _IOW(MWAVE_MINOR,10,int) #define IOCTL_MW_GET_IPC _IOW(MWAVE_MINOR,11,int) -#define IOCTL_MW_TRACE _IOR(MWAVE_MINOR,12,MW_READWRITE) +#define IOCTL_MW_TRACE _IOR(MWAVE_MINOR,12,struct mw_readwrite) =20 =20 #endif diff --git a/drivers/char/mwave/smapi.c b/drivers/char/mwave/smapi.c index 107a2cb9c31c..df6354b24339 100644 --- a/drivers/char/mwave/smapi.c +++ b/drivers/char/mwave/smapi.c @@ -116,7 +116,7 @@ static int smapi_request(unsigned short inBX, unsigned = short inCX, } =20 =20 -int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings) +int smapi_query_DSP_cfg(struct smapi_dsp_settings *pSettings) { int bRC; unsigned short usAX, usBX, usCX, usDX, usDI, usSI; diff --git a/drivers/char/mwave/smapi.h b/drivers/char/mwave/smapi.h index ebc206b000b9..e605b16ed23c 100644 --- a/drivers/char/mwave/smapi.h +++ b/drivers/char/mwave/smapi.h @@ -49,7 +49,7 @@ #ifndef _LINUX_SMAPI_H #define _LINUX_SMAPI_H =20 -typedef struct { +struct smapi_dsp_settings { int bDSPPresent; int bDSPEnabled; int bModemEnabled; @@ -65,10 +65,10 @@ typedef struct { unsigned short usSndblstIRQ; unsigned short usSndblstDMA; unsigned short usSndblstBaseIO; -} SMAPI_DSP_SETTINGS; +}; =20 int smapi_init(void); -int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings); +int smapi_query_DSP_cfg(struct smapi_dsp_settings *pSettings); int smapi_set_DSP_cfg(void); int smapi_set_DSP_power_state(bool bOn); =20 diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c index 6a924e1bc678..7363b0f764e0 100644 --- a/drivers/char/mwave/tp3780i.c +++ b/drivers/char/mwave/tp3780i.c @@ -67,9 +67,9 @@ static unsigned short s_ausThinkpadDmaToField[8] =3D static unsigned short s_numIrqs =3D 16, s_numDmas =3D 8; =20 =20 -static void EnableSRAM(THINKPAD_BD_DATA * pBDData) +static void EnableSRAM(struct thinkpad_bd_data *pBDData) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; DSP_GPIO_OUTPUT_DATA_15_8 rGpioOutputData; DSP_GPIO_DRIVER_ENABLE_15_8 rGpioDriverEnable; @@ -98,8 +98,8 @@ static irqreturn_t UartInterrupt(int irq, void *dev_id) =20 static irqreturn_t DspInterrupt(int irq, void *dev_id) { - pMWAVE_DEVICE_DATA pDrvData =3D &mwave_s_mdd; - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pDrvData->rBDData.rDspSettings; + struct mwave_device_data *pDrvData =3D &mwave_s_mdd; + struct dsp_3780i_config_settings *pSettings =3D &pDrvData->rBDData.rDspSe= ttings; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; unsigned short usIPCSource =3D 0, usIsolationMask, usPCNum; =20 @@ -125,10 +125,10 @@ static irqreturn_t DspInterrupt(int irq, void *dev_id) } =20 =20 -int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pBDData) +int tp3780I_InitializeBoardData(struct thinkpad_bd_data *pBDData) { int retval =3D 0; - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; =20 pBDData->bDSPEnabled =3D false; pSettings->bInterruptClaimed =3D false; @@ -145,14 +145,14 @@ int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pB= DData) return retval; } =20 -void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData) +void tp3780I_Cleanup(struct thinkpad_bd_data *pBDData) { } =20 -int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData) +int tp3780I_CalcResources(struct thinkpad_bd_data *pBDData) { - SMAPI_DSP_SETTINGS rSmapiInfo; - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct smapi_dsp_settings rSmapiInfo; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; =20 if (smapi_query_DSP_cfg(&rSmapiInfo)) { pr_err("%s: Error: Could not query DSP config. Aborting.\n", __func__); @@ -192,10 +192,10 @@ int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData) } =20 =20 -int tp3780I_ClaimResources(THINKPAD_BD_DATA * pBDData) +int tp3780I_ClaimResources(struct thinkpad_bd_data *pBDData) { int retval =3D 0; - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; struct resource *pres; =20 pres =3D request_region(pSettings->usDspBaseIO, 16, "mwave_3780i"); @@ -210,9 +210,9 @@ int tp3780I_ClaimResources(THINKPAD_BD_DATA * pBDData) return retval; } =20 -int tp3780I_ReleaseResources(THINKPAD_BD_DATA * pBDData) +int tp3780I_ReleaseResources(struct thinkpad_bd_data *pBDData) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; =20 release_region(pSettings->usDspBaseIO & (~3), 16); =20 @@ -226,9 +226,9 @@ int tp3780I_ReleaseResources(THINKPAD_BD_DATA * pBDData) =20 =20 =20 -int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) +int tp3780I_EnableDSP(struct thinkpad_bd_data *pBDData) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; bool bDSPPoweredUp =3D false, bInterruptAllocated =3D false; =20 if (pBDData->bDSPEnabled) { @@ -351,9 +351,9 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) } =20 =20 -int tp3780I_DisableDSP(THINKPAD_BD_DATA * pBDData) +int tp3780I_DisableDSP(struct thinkpad_bd_data *pBDData) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; =20 if (pBDData->bDSPEnabled) { dsp3780I_DisableDSP(&pBDData->rDspSettings); @@ -369,9 +369,9 @@ int tp3780I_DisableDSP(THINKPAD_BD_DATA * pBDData) } =20 =20 -int tp3780I_ResetDSP(THINKPAD_BD_DATA * pBDData) +int tp3780I_ResetDSP(struct thinkpad_bd_data *pBDData) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; =20 if (dsp3780I_Reset(pSettings) =3D=3D 0) { EnableSRAM(pBDData); @@ -381,9 +381,9 @@ int tp3780I_ResetDSP(THINKPAD_BD_DATA * pBDData) } =20 =20 -int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData) +int tp3780I_StartDSP(struct thinkpad_bd_data *pBDData) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; =20 if (dsp3780I_Run(pSettings) =3D=3D 0) { // @BUG @TBD EnableSRAM(pBDData); @@ -395,7 +395,7 @@ int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData) } =20 =20 -int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbi= lities) +int tp3780I_QueryAbilities(struct thinkpad_bd_data *pBDData, struct mw_abi= lities *pAbilities) { memset(pAbilities, 0, sizeof(*pAbilities)); /* fill out standard constant fields */ @@ -424,11 +424,11 @@ int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData= , MW_ABILITIES * pAbilities return 0; } =20 -int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uO= pcode, +int tp3780I_ReadWriteDspDStore(struct thinkpad_bd_data *pBDData, unsigned = int uOpcode, void __user *pvBuffer, unsigned int uCount, unsigned long ulDSPAddr) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; bool bRC =3D 0; =20 @@ -452,11 +452,11 @@ int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBD= Data, unsigned int uOpcode, } =20 =20 -int tp3780I_ReadWriteDspIStore(THINKPAD_BD_DATA * pBDData, unsigned int uO= pcode, +int tp3780I_ReadWriteDspIStore(struct thinkpad_bd_data *pBDData, unsigned = int uOpcode, void __user *pvBuffer, unsigned int uCount, unsigned long ulDSPAddr) { - DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; + struct dsp_3780i_config_settings *pSettings =3D &pBDData->rDspSettings; unsigned short usDspBaseIO =3D pSettings->usDspBaseIO; bool bRC =3D 0; =20 diff --git a/drivers/char/mwave/tp3780i.h b/drivers/char/mwave/tp3780i.h index 8bd976d42fae..c0001a344741 100644 --- a/drivers/char/mwave/tp3780i.h +++ b/drivers/char/mwave/tp3780i.h @@ -75,27 +75,27 @@ #define TP_CFG_PllBypass 0 /* don't bypass */ #define TP_CFG_ChipletEnable 0xFFFF /* Enable all chiplets */ =20 -typedef struct { +struct thinkpad_bd_data { int bDSPEnabled; int bShareDspIrq; int bShareUartIrq; - DSP_3780I_CONFIG_SETTINGS rDspSettings; -} THINKPAD_BD_DATA; + struct dsp_3780i_config_settings rDspSettings; +}; =20 -int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pBDData); -int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData); -int tp3780I_ClaimResources(THINKPAD_BD_DATA * pBDData); -int tp3780I_ReleaseResources(THINKPAD_BD_DATA * pBDData); -int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData); -int tp3780I_DisableDSP(THINKPAD_BD_DATA * pBDData); -int tp3780I_ResetDSP(THINKPAD_BD_DATA * pBDData); -int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData); -int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbi= lities); -void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData); -int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uO= pcode, +int tp3780I_InitializeBoardData(struct thinkpad_bd_data *pBDData); +int tp3780I_CalcResources(struct thinkpad_bd_data *pBDData); +int tp3780I_ClaimResources(struct thinkpad_bd_data *pBDData); +int tp3780I_ReleaseResources(struct thinkpad_bd_data *pBDData); +int tp3780I_EnableDSP(struct thinkpad_bd_data *pBDData); +int tp3780I_DisableDSP(struct thinkpad_bd_data *pBDData); +int tp3780I_ResetDSP(struct thinkpad_bd_data *pBDData); +int tp3780I_StartDSP(struct thinkpad_bd_data *pBDData); +int tp3780I_QueryAbilities(struct thinkpad_bd_data *pBDData, struct mw_abi= lities *pAbilities); +void tp3780I_Cleanup(struct thinkpad_bd_data *pBDData); +int tp3780I_ReadWriteDspDStore(struct thinkpad_bd_data *pBDData, unsigned = int uOpcode, void __user *pvBuffer, unsigned int uCount, unsigned long ulDSPAddr); -int tp3780I_ReadWriteDspIStore(THINKPAD_BD_DATA * pBDData, unsigned int uO= pcode, +int tp3780I_ReadWriteDspIStore(struct thinkpad_bd_data *pBDData, unsigned = int uOpcode, void __user *pvBuffer, unsigned int uCount, unsigned long ulDSPAddr); =20 --=20 2.51.1