MIPSnet: Modernize use platform_device API.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
Jeff Garzik
parent
a5f8f3b6c9
commit
1e2b980fdf
@@ -17,7 +17,8 @@
|
||||
# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
#
|
||||
|
||||
obj-y := sim_setup.o sim_mem.o sim_time.o sim_int.o sim_cmdline.o
|
||||
obj-y := sim_platform.o sim_setup.o sim_mem.o sim_time.o sim_int.o \
|
||||
sim_cmdline.o
|
||||
|
||||
obj-$(CONFIG_EARLY_PRINTK) += sim_console.o
|
||||
obj-$(CONFIG_SMP) += sim_smp.o
|
||||
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user