static int __init fs_init(void) { int r; printk(KERN_INFO "%s", version); r = setup_immap(); if (r != 0) return r; r = driver_register(&fs_enet_fec_driver); if (r != 0) goto err; r = driver_register(&fs_enet_fcc_driver); if (r != 0) goto err; r = driver_register(&fs_enet_scc_driver); if (r != 0) goto err; return 0; err: cleanup_immap(); return r; }
static int __init fs_init(void) { int r; printk(KERN_INFO "%s", version); r = setup_immap(); if (r != 0) return r; #ifdef CONFIG_FS_ENET_HAS_FCC /* let's insert mii stuff */ r = fs_enet_mdio_bb_init(); if (r != 0) { printk(KERN_ERR DRV_MODULE_NAME "BB PHY init failed.\n"); return r; } r = driver_register(&fs_enet_fcc_driver); if (r != 0) goto err; #endif #ifdef CONFIG_FS_ENET_HAS_FEC r = fs_enet_mdio_fec_init(); if (r != 0) { printk(KERN_ERR DRV_MODULE_NAME "FEC PHY init failed.\n"); return r; } r = driver_register(&fs_enet_fec_driver); if (r != 0) goto err; #endif #ifdef CONFIG_FS_ENET_HAS_SCC r = driver_register(&fs_enet_scc_driver); if (r != 0) goto err; #endif return 0; err: cleanup_immap(); return r; }
static int __init fs_init(void) { int r = setup_immap(); if (r != 0) return r; r = of_register_platform_driver(&fs_enet_driver); if (r != 0) goto out; return 0; out: cleanup_immap(); return r; }