static int __init cesadev_init(void) { int rc; if (mvCtrlPwrClckGet(CESA_UNIT_ID, 0) == MV_FALSE) return 0; #if defined(CONFIG_MV78200) || defined(CONFIG_MV632X) if (MV_FALSE == mvSocUnitIsMappedToThisCpu(CESA)) { dprintk("CESA is not mapped to this CPU\n"); return -ENODEV; } #endif if(mvUnitMapIsMine(CESA) == MV_FALSE) return -ENODEV; #ifdef CONFIG_MV_CESA_TEST cesaTestStart(buf_num, buf_size); #endif dprintk("%s(%p)\n", __FUNCTION__, cesadev_init); rc = misc_register(&cesadev); if (rc) { printk(KERN_ERR "cesadev: registration of /dev/cesadev failed\n"); return(rc); } return(0); }
static int __init cesadev_init(void) { int rc; #ifdef CONFIG_MV_CESA_TEST cesaTestStart(buf_num, buf_size); #endif dprintk("%s(%p)\n", __FUNCTION__, cesadev_init); rc = misc_register(&cesadev); if (rc) { printk(KERN_ERR "cesadev: registration of /dev/cesadev failed\n"); return(rc); } return(0); }