Commit 1c7e15b0 authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman
Browse files

char/mwave: drop printk wrapper



PRINTK_ERROR() + KERN_ERR_MWAVE are just wrappers around printk() with
a prefix. Instead, pr_fmt() can be used. Drop the former and use the
latter.

Signed-off-by: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20251119091949.825958-6-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 53688a9f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@
*	First release to the public
*/

#define pr_fmt(fmt) "3780i: " fmt

#include <linux/kernel.h>
#include <linux/unistd.h>
#include <linux/delay.h>
@@ -138,7 +140,7 @@ int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings,
	unsigned short tval;

	if (!pSettings->bDSPEnabled) {
		PRINTK_ERROR( KERN_ERR "3780i::dsp3780I_EnableDSP: Error: DSP not enabled. Aborting.\n" );
		pr_err("%s: Error: DSP not enabled. Aborting.\n", __func__);
		return -EIO;
	}

+17 −41
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@
*	First release to the public
*/

#define pr_fmt(fmt) "mwavedd: " fmt

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
@@ -200,11 +202,8 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
			unsigned int ipcnum = (unsigned int) ioarg;
	
			if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
				PRINTK_ERROR(KERN_ERR_MWAVE
						"mwavedd::mwave_ioctl:"
						" IOCTL_MW_REGISTER_IPC:"
						" Error: Invalid ipcnum %x\n",
						ipcnum);
				pr_err("%s: IOCTL_MW_REGISTER_IPC: Error: Invalid ipcnum %x\n",
				       __func__, ipcnum);
				return -EINVAL;
			}
			ipcnum = array_index_nospec(ipcnum,
@@ -221,10 +220,8 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
			unsigned int ipcnum = (unsigned int) ioarg;
	
			if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
				PRINTK_ERROR(KERN_ERR_MWAVE
						"mwavedd::mwave_ioctl:"
						" IOCTL_MW_GET_IPC: Error:"
						" Invalid ipcnum %x\n", ipcnum);
				pr_err("%s: IOCTL_MW_GET_IPC: Error: Invalid ipcnum %x\n", __func__,
				       ipcnum);
				return -EINVAL;
			}
			ipcnum = array_index_nospec(ipcnum,
@@ -259,11 +256,8 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
			unsigned int ipcnum = (unsigned int) ioarg;
	
			if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
				PRINTK_ERROR(KERN_ERR_MWAVE
						"mwavedd::mwave_ioctl:"
						" IOCTL_MW_UNREGISTER_IPC:"
						" Error: Invalid ipcnum %x\n",
						ipcnum);
				pr_err("%s: IOCTL_MW_UNREGISTER_IPC: Error: Invalid ipcnum %x\n",
				       __func__, ipcnum);
				return -EINVAL;
			}
			ipcnum = array_index_nospec(ipcnum,
@@ -298,9 +292,7 @@ static int register_serial_portandirq(unsigned int port, int irq)
			/* OK */
			break;
		default:
			PRINTK_ERROR(KERN_ERR_MWAVE
					"mwavedd::register_serial_portandirq:"
					" Error: Illegal port %x\n", port );
			pr_err("%s: Error: Illegal port %x\n", __func__, port);
			return -1;
	} /* switch */
	/* port is okay */
@@ -313,9 +305,7 @@ static int register_serial_portandirq(unsigned int port, int irq)
			/* OK */
			break;
		default:
			PRINTK_ERROR(KERN_ERR_MWAVE
					"mwavedd::register_serial_portandirq:"
					" Error: Illegal irq %x\n", irq );
			pr_err("%s: Error: Illegal irq %x\n", __func__, irq);
			return -1;
	} /* switch */
	/* irq is okay */
@@ -391,43 +381,33 @@ static int __init mwave_init(void)

	retval = tp3780I_InitializeBoardData(&pDrvData->rBDData);
	if (retval) {
		PRINTK_ERROR(KERN_ERR_MWAVE
				"mwavedd::mwave_init: Error:"
				" Failed to initialize board data\n");
		pr_err("%s: Error: Failed to initialize board data\n", __func__);
		goto cleanup_error;
	}
	pDrvData->bBDInitialized = true;

	retval = tp3780I_CalcResources(&pDrvData->rBDData);
	if (retval) {
		PRINTK_ERROR(KERN_ERR_MWAVE
				"mwavedd:mwave_init: Error:"
				" Failed to calculate resources\n");
		pr_err("%s: Error: Failed to calculate resources\n", __func__);
		goto cleanup_error;
	}

	retval = tp3780I_ClaimResources(&pDrvData->rBDData);
	if (retval) {
		PRINTK_ERROR(KERN_ERR_MWAVE
				"mwavedd:mwave_init: Error:"
				" Failed to claim resources\n");
		pr_err("%s: Error: Failed to claim resources\n", __func__);
		goto cleanup_error;
	}
	pDrvData->bResourcesClaimed = true;

	retval = tp3780I_EnableDSP(&pDrvData->rBDData);
	if (retval) {
		PRINTK_ERROR(KERN_ERR_MWAVE
				"mwavedd:mwave_init: Error:"
				" Failed to enable DSP\n");
		pr_err("%s: Error: Failed to enable DSP\n", __func__);
		goto cleanup_error;
	}
	pDrvData->bDSPEnabled = true;

	if (misc_register(&mwave_misc_dev) < 0) {
		PRINTK_ERROR(KERN_ERR_MWAVE
				"mwavedd:mwave_init: Error:"
				" Failed to register misc device\n");
		pr_err("%s: Error: Failed to register misc device\n", __func__);
		goto cleanup_error;
	}
	pDrvData->bMwaveDevRegistered = true;
@@ -437,9 +417,7 @@ static int __init mwave_init(void)
		pDrvData->rBDData.rDspSettings.usUartIrq
	);
	if (pDrvData->sLine < 0) {
		PRINTK_ERROR(KERN_ERR_MWAVE
				"mwavedd:mwave_init: Error:"
				" Failed to register serial driver\n");
		pr_err("%s: Error: Failed to register serial driver\n", __func__);
		goto cleanup_error;
	}
	/* uart is registered */
@@ -448,9 +426,7 @@ static int __init mwave_init(void)
	return 0;

cleanup_error:
	PRINTK_ERROR(KERN_ERR_MWAVE
			"mwavedd::mwave_init: Error:"
			" Failed to initialize\n");
	pr_err("%s: Error: Failed to initialize\n", __func__);
	mwave_exit(); /* clean up */

	return -EIO;
+0 −3
Original line number Diff line number Diff line
@@ -61,9 +61,6 @@ extern int mwave_3780i_io;
extern int mwave_uart_irq;
extern int mwave_uart_io;

#define PRINTK_ERROR printk
#define KERN_ERR_MWAVE KERN_ERR "mwave: "

typedef struct _MWAVE_IPC {
	unsigned short usIntCount;	/* 0=none, 1=first, 2=greater than 1st */
	bool bIsEnabled;
+34 −25
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@
*	First release to the public
*/

#define pr_fmt(fmt) "smapi: " fmt

#include <linux/kernel.h>
#include <linux/mc146818rtc.h>	/* CMOS defines */
#include "smapi.h"
@@ -127,7 +129,7 @@ int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings)
	bRC = smapi_request(0x1802, 0x0000, 0, 0,
		&usAX, &usBX, &usCX, &usDX, &usDI, &usSI);
	if (bRC) {
		PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Error: Could not get DSP Settings. Aborting.\n");
		pr_err("%s: Error: Could not get DSP Settings. Aborting.\n", __func__);
		return bRC;
	}

@@ -143,14 +145,14 @@ int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings)

	/* check for illegal values */
	if ( pSettings->usDspBaseIO == 0 ) 
		PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: DSP base I/O address is 0\n");
		pr_err("%s: Worry: DSP base I/O address is 0\n", __func__);
	if ( pSettings->usDspIRQ == 0 )
		PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: DSP IRQ line is 0\n");
		pr_err("%s: Worry: DSP IRQ line is 0\n", __func__);

	bRC = smapi_request(0x1804, 0x0000, 0, 0,
	   	&usAX, &usBX, &usCX, &usDX, &usDI, &usSI);
	if (bRC) {
		PRINTK_ERROR("smapi::smapi_query_DSP_cfg: Error: Could not get DSP modem settings. Aborting.\n");
		pr_err("%s: Error: Could not get DSP modem settings. Aborting.\n", __func__);
		return bRC;
	} 

@@ -164,9 +166,9 @@ int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings)

	/* check for illegal values */
	if ( pSettings->usUartBaseIO == 0 ) 
		PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: UART base I/O address is 0\n");
		pr_err("%s: Worry: UART base I/O address is 0\n", __func__);
	if ( pSettings->usUartIRQ == 0 )
		PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: UART IRQ line is 0\n");
		pr_err("%s: Worry: UART IRQ line is 0\n", __func__);

	return bRC;
}
@@ -195,7 +197,8 @@ int smapi_set_DSP_cfg(void)
				break;
		}
		if (i == ARRAY_SIZE(ausDspBases)) {
			PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid mwave_3780i_io address %x. Aborting.\n", mwave_3780i_io);
			pr_err("%s: Error: Invalid mwave_3780i_io address %x. Aborting.\n",
			       __func__, mwave_3780i_io);
			return bRC;
		}
		dspio_index = i;
@@ -207,7 +210,8 @@ int smapi_set_DSP_cfg(void)
				break;
		}
		if (i == ARRAY_SIZE(ausDspIrqs)) {
			PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid mwave_3780i_irq %x. Aborting.\n", mwave_3780i_irq);
			pr_err("%s: Error: Invalid mwave_3780i_irq %x. Aborting.\n", __func__,
			       mwave_3780i_irq);
			return bRC;
		}
	}
@@ -218,7 +222,8 @@ int smapi_set_DSP_cfg(void)
				break;
		}
		if (i == ARRAY_SIZE(ausUartBases)) {
			PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid mwave_uart_io address %x. Aborting.\n", mwave_uart_io);
			pr_err("%s: Error: Invalid mwave_uart_io address %x. Aborting.\n", __func__,
			       mwave_uart_io);
			return bRC;
		}
		uartio_index = i;
@@ -231,7 +236,8 @@ int smapi_set_DSP_cfg(void)
				break;
		}
		if (i == ARRAY_SIZE(ausUartIrqs)) {
			PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid mwave_uart_irq %x. Aborting.\n", mwave_uart_irq);
			pr_err("%s: Error: Invalid mwave_uart_irq %x. Aborting.\n", __func__,
			       mwave_uart_irq);
			return bRC;
		}
	}
@@ -246,13 +252,14 @@ int smapi_set_DSP_cfg(void)
		if (usBX & 0x0100) {	/* serial port A is present */
			if (usCX & 1) {	/* serial port is enabled */
				if ((usSI & 0xFF) == mwave_uart_irq) {
					PRINTK_ERROR(KERN_ERR_MWAVE
						"smapi::smapi_set_DSP_cfg: Serial port A irq %x conflicts with mwave_uart_irq %x\n", usSI & 0xFF, mwave_uart_irq);
					pr_err("%s: Serial port A irq %x conflicts with mwave_uart_irq %x\n",
					       __func__, usSI & 0xFF, mwave_uart_irq);
					goto exit_conflict;
				} else {
					if ((usSI >> 8) == uartio_index) {
						PRINTK_ERROR(KERN_ERR_MWAVE
							"smapi::smapi_set_DSP_cfg: Serial port A base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio_index]);
						pr_err("%s: Serial port A base I/O address %x conflicts with mwave uart I/O %x\n",
						       __func__, ausUartBases[usSI >> 8],
						       ausUartBases[uartio_index]);
						goto exit_conflict;
					}
				}
@@ -267,13 +274,14 @@ int smapi_set_DSP_cfg(void)
		if (usBX & 0x0100) {	/* serial port B is present */
			if (usCX & 1) {	/* serial port is enabled */
				if ((usSI & 0xFF) == mwave_uart_irq) {
					PRINTK_ERROR(KERN_ERR_MWAVE
						"smapi::smapi_set_DSP_cfg: Serial port B irq %x conflicts with mwave_uart_irq %x\n", usSI & 0xFF, mwave_uart_irq);
					pr_err("%s: Serial port B irq %x conflicts with mwave_uart_irq %x\n",
					       __func__, usSI & 0xFF, mwave_uart_irq);
					goto exit_conflict;
				} else {
					if ((usSI >> 8) == uartio_index) {
						PRINTK_ERROR(KERN_ERR_MWAVE
							"smapi::smapi_set_DSP_cfg: Serial port B base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio_index]);
						pr_err("%s: Serial port B base I/O address %x conflicts with mwave uart I/O %x\n",
						       __func__, ausUartBases[usSI >> 8],
						       ausUartBases[uartio_index]);
						goto exit_conflict;
					}
				}
@@ -290,13 +298,14 @@ int smapi_set_DSP_cfg(void)
		/* bRC == 0 */
		if ((usCX & 0xff) != 0xff) { /* IR port not disabled */
			if ((usCX & 0xff) == mwave_uart_irq) {
				PRINTK_ERROR(KERN_ERR_MWAVE
					"smapi::smapi_set_DSP_cfg: IR port irq %x conflicts with mwave_uart_irq %x\n", usCX & 0xff, mwave_uart_irq);
				pr_err("%s: IR port irq %x conflicts with mwave_uart_irq %x\n",
				       __func__, usCX & 0xff, mwave_uart_irq);
				goto exit_conflict;
			} else {
				if ((usSI & 0xff) == uartio_index) {
					PRINTK_ERROR(KERN_ERR_MWAVE
						"smapi::smapi_set_DSP_cfg: IR port base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI & 0xff], ausUartBases[uartio_index]);
					pr_err("%s: IR port base I/O address %x conflicts with mwave uart I/O %x\n",
					       __func__, ausUartBases[usSI & 0xff],
					       ausUartBases[uartio_index]);
					goto exit_conflict;
				}
			}
@@ -348,7 +357,7 @@ int smapi_set_DSP_cfg(void)
	return -EIO;

exit_smapi_request_error:
	PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg exit on smapi_request error bRC %x\n", bRC);
	pr_err("%s: exit on smapi_request error bRC %x\n", __func__, bRC);
	return bRC;
}

@@ -381,13 +390,13 @@ int smapi_init(void)
		g_usSmapiPort |= (CMOS_READ(0x7F) << 8);
		spin_unlock_irqrestore(&rtc_lock, flags);
		if (g_usSmapiPort == 0) {
			PRINTK_ERROR("smapi::smapi_init, ERROR unable to read from SMAPI port\n");
			pr_err("%s: ERROR unable to read from SMAPI port\n", __func__);
		} else {
			retval = 0;
			//SmapiQuerySystemID();
		}
	} else {
		PRINTK_ERROR("smapi::smapi_init, ERROR invalid usSmapiID\n");
		pr_err("%s: ERROR invalid usSmapiID\n", __func__);
		retval = -ENXIO;
	}

+20 −15
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@
*	First release to the public
*/

#define pr_fmt(fmt) "tp3780i: " fmt

#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/ptrace.h>
@@ -133,7 +135,7 @@ int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pBDData)

	retval = smapi_init();
	if (retval) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_InitializeBoardData: Error: SMAPI is not available on this machine\n");
		pr_err("%s: Error: SMAPI is not available on this machine\n", __func__);
	} else {
		if (mwave_3780i_irq || mwave_3780i_io || mwave_uart_irq || mwave_uart_io) {
			retval = smapi_set_DSP_cfg();
@@ -153,7 +155,7 @@ int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData)
	DSP_3780I_CONFIG_SETTINGS *pSettings = &pBDData->rDspSettings;

	if (smapi_query_DSP_cfg(&rSmapiInfo)) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_CalcResources: Error: Could not query DSP config. Aborting.\n");
		pr_err("%s: Error: Could not query DSP config. Aborting.\n", __func__);
		return -EIO;
	}

@@ -164,7 +166,7 @@ int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData)
		|| ( rSmapiInfo.usUartIRQ ==  0 )
		|| ( rSmapiInfo.usUartBaseIO ==  0 )
	) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_CalcResources: Error: Illegal resource setting. Aborting.\n");
		pr_err("%s: Error: Illegal resource setting. Aborting.\n", __func__);
		return -EIO;
	}

@@ -200,7 +202,8 @@ int tp3780I_ClaimResources(THINKPAD_BD_DATA * pBDData)
	if ( pres == NULL ) retval = -EIO;

	if (retval) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_ClaimResources: Error: Could not claim I/O region starting at %x\n", pSettings->usDspBaseIO);
		pr_err("%s: Error: Could not claim I/O region starting at %x\n", __func__,
		       pSettings->usDspBaseIO);
		return -EIO;
	}

@@ -229,12 +232,12 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
	bool bDSPPoweredUp = false, bInterruptAllocated = false;

	if (pBDData->bDSPEnabled) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: DSP already enabled!\n");
		pr_err("%s: Error: DSP already enabled!\n", __func__);
		goto exit_cleanup;
	}

	if (!pSettings->bDSPEnabled) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780::tp3780I_EnableDSP: Error: pSettings->bDSPEnabled not set\n");
		pr_err("%s: Error: pSettings->bDSPEnabled not set\n", __func__);
		goto exit_cleanup;
	}

@@ -244,7 +247,7 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
		|| (s_ausThinkpadIrqToField[pSettings->usDspIrq] == 0xFFFF)
		|| (s_ausThinkpadDmaToField[pSettings->usDspDma] == 0xFFFF)
	) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: invalid irq %x\n", pSettings->usDspIrq);
		pr_err("%s: Error: invalid irq %x\n", __func__, pSettings->usDspIrq);
		goto exit_cleanup;
	}

@@ -252,7 +255,8 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
		((pSettings->usDspBaseIO & 0xF00F) != 0)
		|| (pSettings->usDspBaseIO & 0x0FF0) == 0
	) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Invalid DSP base I/O address %x\n", pSettings->usDspBaseIO);
		pr_err("%s: Error: Invalid DSP base I/O address %x\n", __func__,
		       pSettings->usDspBaseIO);
		goto exit_cleanup;
	}

@@ -261,7 +265,7 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
			pSettings->usUartIrq >= s_numIrqs
			|| s_ausThinkpadIrqToField[pSettings->usUartIrq] == 0xFFFF
		) {
			PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Invalid UART IRQ %x\n", pSettings->usUartIrq);
			pr_err("%s: Error: Invalid UART IRQ %x\n", __func__, pSettings->usUartIrq);
			goto exit_cleanup;
		}
		switch (pSettings->usUartBaseIO) {
@@ -272,7 +276,8 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
				break;

			default:
				PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Invalid UART base I/O address %x\n", pSettings->usUartBaseIO);
				pr_err("%s: Error: Invalid UART base I/O address %x\n", __func__,
				       pSettings->usUartBaseIO);
				goto exit_cleanup;
		}
	}
@@ -301,14 +306,14 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
	pSettings->usChipletEnable = TP_CFG_ChipletEnable;

	if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart", NULL)) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq);
		pr_err("%s: Error: Could not get UART IRQ %x\n", __func__, pSettings->usUartIrq);
		goto exit_cleanup;
	} else {		/* no conflict just release */
		free_irq(pSettings->usUartIrq, NULL);
	}

	if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i", NULL)) {
		PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq);
		pr_err("%s: Error: Could not get 3780i IRQ %x\n", __func__, pSettings->usDspIrq);
		goto exit_cleanup;
	} else {
		bInterruptAllocated = true;
@@ -317,14 +322,14 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)

	smapi_set_DSP_power_state(false);
	if (smapi_set_DSP_power_state(true)) {
		PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: smapi_set_DSP_power_state(true) failed\n");
		pr_err("%s: Error: smapi_set_DSP_power_state(true) failed\n", __func__);
		goto exit_cleanup;
	} else {
		bDSPPoweredUp = true;
	}

	if (dsp3780I_EnableDSP(pSettings, s_ausThinkpadIrqToField, s_ausThinkpadDmaToField)) {
		PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: dsp7880I_EnableDSP() failed\n");
		pr_err("%s: Error: dsp7880I_EnableDSP() failed\n", __func__);
		goto exit_cleanup;
	}

@@ -335,7 +340,7 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
	return 0;

exit_cleanup:
	PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Cleaning up\n");
	pr_err("%s: Cleaning up\n", __func__);
	if (bDSPPoweredUp)
		smapi_set_DSP_power_state(false);
	if (bInterruptAllocated) {