mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
char/mwave: remove dead code
In mwave, there is a lot of commented code for a long time. Drop it. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20251119091949.825958-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9906efa545
commit
3b4d1b226d
@@ -140,35 +140,6 @@ static void dsp3780I_WriteGenCfg(unsigned short usDspBaseIO, unsigned uIndex,
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
unsigned char dsp3780I_ReadGenCfg(unsigned short usDspBaseIO,
|
||||
unsigned uIndex)
|
||||
{
|
||||
DSP_ISA_SLAVE_CONTROL rSlaveControl;
|
||||
DSP_ISA_SLAVE_CONTROL rSlaveControl_Save;
|
||||
unsigned char ucValue;
|
||||
|
||||
|
||||
PRINTK_3(TRACE_3780I,
|
||||
"3780i::dsp3780i_ReadGenCfg entry usDspBaseIO %x uIndex %x\n",
|
||||
usDspBaseIO, uIndex);
|
||||
|
||||
MKBYTE(rSlaveControl) = InByteDsp(DSP_IsaSlaveControl);
|
||||
rSlaveControl_Save = rSlaveControl;
|
||||
rSlaveControl.ConfigMode = true;
|
||||
OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl));
|
||||
OutByteDsp(DSP_ConfigAddress, (unsigned char) uIndex);
|
||||
ucValue = InByteDsp(DSP_ConfigData);
|
||||
OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl_Save));
|
||||
|
||||
PRINTK_2(TRACE_3780I,
|
||||
"3780i::dsp3780i_ReadGenCfg exit ucValue %x\n", ucValue);
|
||||
|
||||
|
||||
return ucValue;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings,
|
||||
unsigned short *pIrqMap,
|
||||
unsigned short *pDmaMap)
|
||||
|
||||
@@ -492,42 +492,6 @@ static const struct file_operations mwave_fops = {
|
||||
|
||||
static struct miscdevice mwave_misc_dev = { MWAVE_MINOR, "mwave", &mwave_fops };
|
||||
|
||||
#if 0 /* totally b0rked */
|
||||
/*
|
||||
* sysfs support <paulsch@us.ibm.com>
|
||||
*/
|
||||
|
||||
struct device mwave_device;
|
||||
|
||||
/* Prevent code redundancy, create a macro for mwave_show_* functions. */
|
||||
#define mwave_show_function(attr_name, format_string, field) \
|
||||
static ssize_t mwave_show_##attr_name(struct device *dev, struct device_attribute *attr, char *buf) \
|
||||
{ \
|
||||
DSP_3780I_CONFIG_SETTINGS *pSettings = \
|
||||
&mwave_s_mdd.rBDData.rDspSettings; \
|
||||
return sprintf(buf, format_string, pSettings->field); \
|
||||
}
|
||||
|
||||
/* All of our attributes are read attributes. */
|
||||
#define mwave_dev_rd_attr(attr_name, format_string, field) \
|
||||
mwave_show_function(attr_name, format_string, field) \
|
||||
static DEVICE_ATTR(attr_name, S_IRUGO, mwave_show_##attr_name, NULL)
|
||||
|
||||
mwave_dev_rd_attr (3780i_dma, "%i\n", usDspDma);
|
||||
mwave_dev_rd_attr (3780i_irq, "%i\n", usDspIrq);
|
||||
mwave_dev_rd_attr (3780i_io, "%#.4x\n", usDspBaseIO);
|
||||
mwave_dev_rd_attr (uart_irq, "%i\n", usUartIrq);
|
||||
mwave_dev_rd_attr (uart_io, "%#.4x\n", usUartBaseIO);
|
||||
|
||||
static struct device_attribute * const mwave_dev_attrs[] = {
|
||||
&dev_attr_3780i_dma,
|
||||
&dev_attr_3780i_irq,
|
||||
&dev_attr_3780i_io,
|
||||
&dev_attr_uart_irq,
|
||||
&dev_attr_uart_io,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mwave_init is called on module load
|
||||
*
|
||||
@@ -540,17 +504,6 @@ static void mwave_exit(void)
|
||||
|
||||
PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n");
|
||||
|
||||
#if 0
|
||||
for (i = 0; i < pDrvData->nr_registered_attrs; i++)
|
||||
device_remove_file(&mwave_device, mwave_dev_attrs[i]);
|
||||
pDrvData->nr_registered_attrs = 0;
|
||||
|
||||
if (pDrvData->device_registered) {
|
||||
device_unregister(&mwave_device);
|
||||
pDrvData->device_registered = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( pDrvData->sLine >= 0 ) {
|
||||
serial8250_unregister_port(pDrvData->sLine);
|
||||
}
|
||||
@@ -667,26 +620,6 @@ static int __init mwave_init(void)
|
||||
}
|
||||
/* uart is registered */
|
||||
|
||||
#if 0
|
||||
/* sysfs */
|
||||
memset(&mwave_device, 0, sizeof (struct device));
|
||||
dev_set_name(&mwave_device, "mwave");
|
||||
|
||||
if (device_register(&mwave_device))
|
||||
goto cleanup_error;
|
||||
pDrvData->device_registered = true;
|
||||
for (i = 0; i < ARRAY_SIZE(mwave_dev_attrs); i++) {
|
||||
if(device_create_file(&mwave_device, mwave_dev_attrs[i])) {
|
||||
PRINTK_ERROR(KERN_ERR_MWAVE
|
||||
"mwavedd:mwave_init: Error:"
|
||||
" Failed to create sysfs file %s\n",
|
||||
mwave_dev_attrs[i]->attr.name);
|
||||
goto cleanup_error;
|
||||
}
|
||||
pDrvData->nr_registered_attrs++;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* SUCCESS! */
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -513,28 +513,6 @@ int smapi_set_DSP_power_state(bool bOn)
|
||||
return bRC;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int SmapiQuerySystemID(void)
|
||||
{
|
||||
int bRC = -EIO;
|
||||
unsigned short usAX = 0xffff, usBX = 0xffff, usCX = 0xffff,
|
||||
usDX = 0xffff, usDI = 0xffff, usSI = 0xffff;
|
||||
|
||||
printk("smapi::SmapiQUerySystemID entry\n");
|
||||
bRC = smapi_request(0x0000, 0, 0, 0,
|
||||
&usAX, &usBX, &usCX, &usDX, &usDI, &usSI);
|
||||
|
||||
if (bRC == 0) {
|
||||
printk("AX=%x, BX=%x, CX=%x, DX=%x, DI=%x, SI=%x\n",
|
||||
usAX, usBX, usCX, usDX, usDI, usSI);
|
||||
} else {
|
||||
printk("smapi::SmapiQuerySystemID smapi_request error\n");
|
||||
}
|
||||
|
||||
return bRC;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
int smapi_init(void)
|
||||
{
|
||||
int retval = -EIO;
|
||||
|
||||
Reference in New Issue
Block a user