Exemplo n.º 1
0
static int __init pmt_init(void)
{
    struct proc_dir_entry *pmt_upgrade_proc;

    pmt_upgrade_proc = create_proc_entry("sd_upgrade", 0600, NULL);
    if (pmt_upgrade_proc) {
        pmt_upgrade_proc->write_proc = pmt_upgrade_proc_write;
        pmt_info("[%s]success to register /proc/sd_upgrade(%pf)\n", __func__, pmt_upgrade_proc->write_proc);
    } else {
        pmt_err("[%s]fail to register /proc/sd_upgrade\n", __func__);
    }

    create_pmt_cdev();

    return 0;
}
Exemplo n.º 2
0
static int __init pmt_interface_init(void)
{
	struct proc_dir_entry *sd_upgrade_proc = NULL;

	sd_upgrade_proc = create_proc_entry("sd_upgrade", 0600, NULL);
	if (sd_upgrade_proc) {
		sd_upgrade_proc->write_proc = sd_upgrade_proc_write;
		printk( "pmt_interface_init: register /proc/sd_upgrade success %p\n",sd_upgrade_proc->write_proc);
	} else {
		printk( "pmt_interface_init: unable to register /proc/sd_upgrade\n");
	}

    create_pmt_cdev();

    return 0;
}