sim_platform.c 822 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2007 by Ralf Baechle (ralf@linux-mips.org)
  7. */
  8. #include <linux/init.h>
  9. #include <linux/if_ether.h>
  10. #include <linux/kernel.h>
  11. #include <linux/platform_device.h>
  12. static char mipsnet_string[] = "mipsnet";
  13. static struct platform_device eth1_device = {
  14. .name = mipsnet_string,
  15. .id = 0,
  16. };
  17. /*
  18. * Create a platform device for the GPI port that receives the
  19. * image data from the embedded camera.
  20. */
  21. static int __init mipsnet_devinit(void)
  22. {
  23. int err;
  24. err = platform_device_register(&eth1_device);
  25. if (err)
  26. printk(KERN_ERR "%s: registration failed\n", mipsnet_string);
  27. return err;
  28. }
  29. device_initcall(mipsnet_devinit);