From 1e2b980fdfb6189baa779ba7de93f7dba70aa3fd Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 18 Mar 2007 23:21:22 +0000 Subject: MIPSnet: Modernize use platform_device API. Signed-off-by: Ralf Baechle Signed-off-by: Jeff Garzik --- arch/mips/mips-boards/sim/sim_platform.c | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 arch/mips/mips-boards/sim/sim_platform.c (limited to 'arch/mips/mips-boards/sim/sim_platform.c') diff --git a/arch/mips/mips-boards/sim/sim_platform.c b/arch/mips/mips-boards/sim/sim_platform.c new file mode 100644 index 000000000000..53210a8c5dec --- /dev/null +++ b/arch/mips/mips-boards/sim/sim_platform.c @@ -0,0 +1,35 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2007 by Ralf Baechle (ralf@linux-mips.org) + */ +#include +#include +#include +#include + +static char mipsnet_string[] = "mipsnet"; + +static struct platform_device eth1_device = { + .name = mipsnet_string, + .id = 0, +}; + +/* + * Create a platform device for the GPI port that receives the + * image data from the embedded camera. + */ +static int __init mipsnet_devinit(void) +{ + int err; + + err = platform_device_register(ð1_device); + if (err) + printk(KERN_ERR "%s: registration failed\n", mipsnet_string); + + return err; +} + +device_initcall(mipsnet_devinit); -- cgit v1.2.3-55-g7522