Skip to content

Commit 3b4d1b2

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
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>
1 parent 9906efa commit 3b4d1b2

3 files changed

Lines changed: 0 additions & 118 deletions

File tree

drivers/char/mwave/3780i.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -140,35 +140,6 @@ static void dsp3780I_WriteGenCfg(unsigned short usDspBaseIO, unsigned uIndex,
140140

141141
}
142142

143-
#if 0
144-
unsigned char dsp3780I_ReadGenCfg(unsigned short usDspBaseIO,
145-
unsigned uIndex)
146-
{
147-
DSP_ISA_SLAVE_CONTROL rSlaveControl;
148-
DSP_ISA_SLAVE_CONTROL rSlaveControl_Save;
149-
unsigned char ucValue;
150-
151-
152-
PRINTK_3(TRACE_3780I,
153-
"3780i::dsp3780i_ReadGenCfg entry usDspBaseIO %x uIndex %x\n",
154-
usDspBaseIO, uIndex);
155-
156-
MKBYTE(rSlaveControl) = InByteDsp(DSP_IsaSlaveControl);
157-
rSlaveControl_Save = rSlaveControl;
158-
rSlaveControl.ConfigMode = true;
159-
OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl));
160-
OutByteDsp(DSP_ConfigAddress, (unsigned char) uIndex);
161-
ucValue = InByteDsp(DSP_ConfigData);
162-
OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl_Save));
163-
164-
PRINTK_2(TRACE_3780I,
165-
"3780i::dsp3780i_ReadGenCfg exit ucValue %x\n", ucValue);
166-
167-
168-
return ucValue;
169-
}
170-
#endif /* 0 */
171-
172143
int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings,
173144
unsigned short *pIrqMap,
174145
unsigned short *pDmaMap)

drivers/char/mwave/mwavedd.c

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -492,42 +492,6 @@ static const struct file_operations mwave_fops = {
492492

493493
static struct miscdevice mwave_misc_dev = { MWAVE_MINOR, "mwave", &mwave_fops };
494494

495-
#if 0 /* totally b0rked */
496-
/*
497-
* sysfs support <paulsch@us.ibm.com>
498-
*/
499-
500-
struct device mwave_device;
501-
502-
/* Prevent code redundancy, create a macro for mwave_show_* functions. */
503-
#define mwave_show_function(attr_name, format_string, field) \
504-
static ssize_t mwave_show_##attr_name(struct device *dev, struct device_attribute *attr, char *buf) \
505-
{ \
506-
DSP_3780I_CONFIG_SETTINGS *pSettings = \
507-
&mwave_s_mdd.rBDData.rDspSettings; \
508-
return sprintf(buf, format_string, pSettings->field); \
509-
}
510-
511-
/* All of our attributes are read attributes. */
512-
#define mwave_dev_rd_attr(attr_name, format_string, field) \
513-
mwave_show_function(attr_name, format_string, field) \
514-
static DEVICE_ATTR(attr_name, S_IRUGO, mwave_show_##attr_name, NULL)
515-
516-
mwave_dev_rd_attr (3780i_dma, "%i\n", usDspDma);
517-
mwave_dev_rd_attr (3780i_irq, "%i\n", usDspIrq);
518-
mwave_dev_rd_attr (3780i_io, "%#.4x\n", usDspBaseIO);
519-
mwave_dev_rd_attr (uart_irq, "%i\n", usUartIrq);
520-
mwave_dev_rd_attr (uart_io, "%#.4x\n", usUartBaseIO);
521-
522-
static struct device_attribute * const mwave_dev_attrs[] = {
523-
&dev_attr_3780i_dma,
524-
&dev_attr_3780i_irq,
525-
&dev_attr_3780i_io,
526-
&dev_attr_uart_irq,
527-
&dev_attr_uart_io,
528-
};
529-
#endif
530-
531495
/*
532496
* mwave_init is called on module load
533497
*
@@ -540,17 +504,6 @@ static void mwave_exit(void)
540504

541505
PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n");
542506

543-
#if 0
544-
for (i = 0; i < pDrvData->nr_registered_attrs; i++)
545-
device_remove_file(&mwave_device, mwave_dev_attrs[i]);
546-
pDrvData->nr_registered_attrs = 0;
547-
548-
if (pDrvData->device_registered) {
549-
device_unregister(&mwave_device);
550-
pDrvData->device_registered = false;
551-
}
552-
#endif
553-
554507
if ( pDrvData->sLine >= 0 ) {
555508
serial8250_unregister_port(pDrvData->sLine);
556509
}
@@ -667,26 +620,6 @@ static int __init mwave_init(void)
667620
}
668621
/* uart is registered */
669622

670-
#if 0
671-
/* sysfs */
672-
memset(&mwave_device, 0, sizeof (struct device));
673-
dev_set_name(&mwave_device, "mwave");
674-
675-
if (device_register(&mwave_device))
676-
goto cleanup_error;
677-
pDrvData->device_registered = true;
678-
for (i = 0; i < ARRAY_SIZE(mwave_dev_attrs); i++) {
679-
if(device_create_file(&mwave_device, mwave_dev_attrs[i])) {
680-
PRINTK_ERROR(KERN_ERR_MWAVE
681-
"mwavedd:mwave_init: Error:"
682-
" Failed to create sysfs file %s\n",
683-
mwave_dev_attrs[i]->attr.name);
684-
goto cleanup_error;
685-
}
686-
pDrvData->nr_registered_attrs++;
687-
}
688-
#endif
689-
690623
/* SUCCESS! */
691624
return 0;
692625

drivers/char/mwave/smapi.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -513,28 +513,6 @@ int smapi_set_DSP_power_state(bool bOn)
513513
return bRC;
514514
}
515515

516-
#if 0
517-
static int SmapiQuerySystemID(void)
518-
{
519-
int bRC = -EIO;
520-
unsigned short usAX = 0xffff, usBX = 0xffff, usCX = 0xffff,
521-
usDX = 0xffff, usDI = 0xffff, usSI = 0xffff;
522-
523-
printk("smapi::SmapiQUerySystemID entry\n");
524-
bRC = smapi_request(0x0000, 0, 0, 0,
525-
&usAX, &usBX, &usCX, &usDX, &usDI, &usSI);
526-
527-
if (bRC == 0) {
528-
printk("AX=%x, BX=%x, CX=%x, DX=%x, DI=%x, SI=%x\n",
529-
usAX, usBX, usCX, usDX, usDI, usSI);
530-
} else {
531-
printk("smapi::SmapiQuerySystemID smapi_request error\n");
532-
}
533-
534-
return bRC;
535-
}
536-
#endif /* 0 */
537-
538516
int smapi_init(void)
539517
{
540518
int retval = -EIO;

0 commit comments

Comments
 (0)