First page Back Continue Last page Overview Graphics
Init Function
/* Init Functions for module */
static int __init DRVDriverCreate(void)
{
printk("DRV: Driver Installing\n");
/* Global /proc/ entry */
pGlobalProcInfo = create_proc_read_entry(DRV_DEVICE_NAME,
0444,
NULL,
DRVDriverProc,
(void *)DRV_PROC_MESSAGE);
if (NULL == pGlobalProcInfo)
{
printk(KERN_INFO "DRV: Proc info entry failed.\n");
goto errorout;
}
/* Hookup the block device driver. */
DRVBlockStart(DRV_DEVICE_NAME);
// Successfully return.
printk("DRV: Driver Installed Sucessfully\n");
return 0;
errorout:
printk("DRV: Error Installing Driver\n");
DRVDriverErrorClean();
return -1;
}