diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-05-24 11:54:04 (GMT) |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-24 21:20:49 (GMT) |
commit | e971290133d8151c468cd70206fedc92648feb58 (patch) | |
tree | dde9ebfd2a269dd892782c73910255a422a872a5 /arch | |
parent | 73815538e642de66a5607cc16d13004ecb1a3062 (diff) | |
download | linux-e971290133d8151c468cd70206fedc92648feb58.tar.xz |
meth driver renovation
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.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
--
Fixes since previous patch:
o Fixed typo in meth_exit_module()
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/sgi-ip32/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/sgi-ip32/ip32-platform.c | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/mips/sgi-ip32/Makefile b/arch/mips/sgi-ip32/Makefile index 7e14167..60f0227 100644 --- a/arch/mips/sgi-ip32/Makefile +++ b/arch/mips/sgi-ip32/Makefile @@ -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 diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c new file mode 100644 index 0000000..120b159 --- /dev/null +++ b/arch/mips/sgi-ip32/ip32-platform.c @@ -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); |