* [PATCH] remove driver model code in mwave driver
@ 2004-05-13 9:13 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-05-13 9:13 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Someone blindly added sysfs support to the driver long time ago without
understanding the implications (and if they were understood the driver
would need half a rewrite for it). Herber Xu recently noticed the
problems this causes on unload, so let's if 0 out all that code and get
the driver working again.
--- 1.12/drivers/char/mwave/mwavedd.c Wed Sep 10 08:41:45 2003
+++ edited/drivers/char/mwave/mwavedd.c Sun Apr 18 13:31:22 2004
@@ -466,6 +466,7 @@
static struct miscdevice mwave_misc_dev = { MWAVE_MINOR, "mwave", &mwave_fops };
+#if 0 /* totally b0rked */
/*
* sysfs support <paulsch@us.ibm.com>
*/
@@ -499,6 +500,7 @@
&dev_attr_uart_irq,
&dev_attr_uart_io,
};
+#endif
/*
* mwave_init is called on module load
@@ -508,11 +510,11 @@
*/
static void mwave_exit(void)
{
- int i;
pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
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;
@@ -521,6 +523,7 @@
device_unregister(&mwave_device);
pDrvData->device_registered = FALSE;
}
+#endif
if ( pDrvData->sLine >= 0 ) {
unregister_serial(pDrvData->sLine);
@@ -638,6 +641,7 @@
}
/* uart is registered */
+#if 0
/* sysfs */
memset(&mwave_device, 0, sizeof (struct device));
snprintf(mwave_device.bus_id, BUS_ID_SIZE, "mwave");
@@ -655,6 +659,7 @@
}
pDrvData->nr_registered_attrs++;
}
+#endif
/* SUCCESS! */
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-13 9:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-13 9:13 [PATCH] remove driver model code in mwave driver Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®