Skip to contentSkip to conversation

meth driver renovation

NET Applied Ralf Baechle 2 participants 2 messages May 24, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

The meth ethernet driver for the SGI IP32 aka O2 is so far still an old style driver which does not use the device driver model. This is now causing issues with some udev based gadgetry in debian-stable. Fixed by converting the meth driver to a platform device.

--
Fixes since previous patch:

o Fixed typo in meth_exit_module()

arch/mips/sgi-ip32/Makefile +1 -1
index 7e14167..60f0227 100644
@@ -3,5 +3,5 @@
 # under Linux.
 #
 
-obj-y	+= ip32-berr.o ip32-irq.o ip32-setup.o ip32-reset.o \
+obj-y	+= ip32-berr.o ip32-irq.o ip32-platform.o ip32-setup.o ip32-reset.o \
 	   crime.o ip32-memory.o
arch/mips/sgi-ip32/ip32-platform.c new file +20 -0
new file mode 100644
index 0000000..120b159
@@ -0,0 +1,20 @@
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+static __init int meth_devinit(void)
+{
+	struct platform_device *pd;
+	int ret;
+
+	pd = platform_device_alloc("meth", -1);
+	if (!pd)
+		return -ENOMEM;
+
+	ret = platform_device_add(pd);
+	if (ret)
+		platform_device_put(pd);
+
+	return ret;
+}
+
+device_initcall(meth_devinit);
drivers/net/meth.c +45 -23

122 lines not on this page · raw message

Applied
#1 lore raw
Quoted 11 lines · Ralf Baechle

The meth ethernet driver for the SGI IP32 aka O2 is so far still an old style driver which does not use the device driver model. This is now causing issues with some udev based gadgetry in debian-stable. Fixed by converting the meth driver to a platform device.

--
Fixes since previous patch:

o Fixed typo in meth_exit_module()

applied