diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-18 23:21:22 +0000 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:01:01 -0400 |
commit | 1e2b980fdfb6189baa779ba7de93f7dba70aa3fd (patch) | |
tree | cd3188ada5197acb52c8322b560915524c797f16 /arch/mips/mips-boards/sim/sim_platform.c | |
parent | a5f8f3b6c91b07ee9aa2445a92a1d6c00a71a3cd (diff) | |
download | lwn-1e2b980fdfb6189baa779ba7de93f7dba70aa3fd.tar.gz lwn-1e2b980fdfb6189baa779ba7de93f7dba70aa3fd.zip |
MIPSnet: Modernize use platform_device API.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'arch/mips/mips-boards/sim/sim_platform.c')
-rw-r--r-- | arch/mips/mips-boards/sim/sim_platform.c | 35 |
1 files changed, 35 insertions, 0 deletions
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 <linux/init.h> +#include <linux/if_ether.h> +#include <linux/kernel.h> +#include <linux/platform_device.h> + +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); |