static void __exit accessory_port_remove(void) { accessory_port_cleanup(); unregister_reboot_notifier(&mx50_accessory_reboot_nb); pr_debug("%s: end\n", __func__); }
static void __exit ak98_wdt_exit(void) { unregister_reboot_notifier(&ak98_wdt_nb); ak_rtc_power(RTC_OFF); misc_deregister(&ak98_wdt_miscdev); }
static int dcdbas_remove(struct platform_device *dev) { unregister_reboot_notifier(&dcdbas_reboot_nb); sysfs_remove_group(&dev->dev.kobj, &dcdbas_attr_group); return 0; }
/***************************************************************************** 函 数 名 : hi6xxx_tsensor_shutdown 功能描述 : tsensor driver shutdown函数 输入参数 : pdev:设备句柄 输出参数 : 无 返 回 值 : 无 调用函数 : 被调函数 : 修改历史 : 1.日 期 : 2013年5月6日 作 者 : 刘龙 00217270 修改内容 : 新生成函数 *****************************************************************************/ static void hi6xxx_tsensor_shutdown(struct platform_device *pdev) { struct tsensor_devinfo *devinfo = platform_get_drvdata(pdev); printk(KERN_INFO"hi6xxx_tsensor_shutdown\n"); if (devinfo == NULL) { dev_err(&pdev->dev, "devinfo is null\n"); return ; } cancel_delayed_work_sync(&tsensor_gov->tsensor_late_init_work); /*取消tsensor温度监控*/ cancel_delayed_work_sync(&tsensor_gov->tsensor_monitor_work); unregister_reboot_notifier(&tsensor_reboot_nb); /*tsensor挂起 */ tsensor_suspend(); kfree(devinfo); devinfo = NULL; platform_set_drvdata(pdev, NULL); printk("hi6xxx_tsensor_shutdown\n"); return; }
/*=========================================================================== * Module initialization routine */ static int __init vmiwdt_init(void) { int rval; if (!request_region(VMIWDT_WCSR, 1, MOD_NAME)) { printk(KERN_ERR MOD_NAME ": Error requesting region\n"); return -EBUSY; } __wdt_disable(); __wdt_set_timeout(vmiwdt_timeout); register_reboot_notifier(&vmiwdt_notifier); rval = misc_register(&miscdev); if (rval) { printk(KERN_ERR MOD_NAME ": Failed registering device\n"); goto err_register; } printk(KERN_NOTICE MOD_NAME ": Installed VMIC watchdog timer module version: %s\n", MOD_VERSION); return 0; err_register: unregister_reboot_notifier(&vmiwdt_notifier); release_region(VMIWDT_WCSR, 1); return rval; }
void card_cleanup_queue(struct card_queue *cq) { struct request_queue *q = cq->queue; unsigned long flags; card_queue_resume(cq); /*should unregister reboot notifier before kthread stop*/ unregister_reboot_notifier(&cq->nb); /* Then terminate our worker thread */ kthread_stop(cq->thread); /* Empty the queue */ spin_lock_irqsave(q->queue_lock, flags); q->queuedata = NULL; blk_start_queue(q); spin_unlock_irqrestore(q->queue_lock, flags); if (cq->bounce_sg) kfree(cq->bounce_sg); cq->bounce_sg = NULL; if (cq->sg) kfree(cq->sg); cq->sg = NULL; //if (cq->bounce_buf) // kfree(cq->bounce_buf); cq->bounce_buf = NULL; cq->card = NULL; }
/** * cmm_init - Module initialization * * Return value: * 0 on success / other on failure **/ static int cmm_init(void) { int rc = -ENOMEM; if (!firmware_has_feature(FW_FEATURE_CMO)) return -EOPNOTSUPP; if ((rc = register_oom_notifier(&cmm_oom_nb)) < 0) return rc; if ((rc = register_reboot_notifier(&cmm_reboot_nb))) goto out_oom_notifier; if ((rc = cmm_sysfs_register(&cmm_sysdev))) goto out_reboot_notifier; if (cmm_disabled) return rc; cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread"); if (IS_ERR(cmm_thread_ptr)) { rc = PTR_ERR(cmm_thread_ptr); goto out_unregister_sysfs; } return rc; out_unregister_sysfs: cmm_unregister_sysfs(&cmm_sysdev); out_reboot_notifier: unregister_reboot_notifier(&cmm_reboot_nb); out_oom_notifier: unregister_oom_notifier(&cmm_oom_nb); return rc; }
static void __exit heartbeat_trig_exit(void) { unregister_reboot_notifier(&heartbeat_reboot_nb); atomic_notifier_chain_unregister(&panic_notifier_list, &heartbeat_panic_nb); led_trigger_unregister(&heartbeat_led_trigger); }
static void __exit tegra_cpufreq_exit(void) { kthread_stop(cpufreq_dfsd); clk_put(clk_cpu); unregister_reboot_notifier(&dfs_reboot_nb); cpufreq_unregister_driver(&s_tegra_cpufreq_driver); }
/** * gcu_exit_module - Driver Exit Cleanup Routine * * gcu_exit_module is called just before the driver is removed * from memory. **/ static void __exit gcu_exit_module(void) { GCU_DBG("%s\n", __func__); unregister_reboot_notifier(&gcu_notifier_reboot); pci_unregister_driver(&gcu_driver); }
/** * dcdbas_exit: perform driver cleanup */ static void __exit dcdbas_exit(void) { /* * make sure functions that use dcdbas_pdev are called * before platform_device_unregister */ unregister_reboot_notifier(&dcdbas_reboot_nb); <<<<<<< HEAD
static int __exit nvdumper_exit(void) { unregister_reboot_notifier(&nvdumper_reboot_notifier); set_dirty_state(0); iounmap(nvdumper_ptr); iounmap(reboot_params); return 0; }
static void __exit nvdumper_exit(void) { nvdumper_regdump_exit(); nvdumper_dbg_footprint_exit(); unregister_reboot_notifier(&nvdumper_reboot_notifier); set_dirty_state(0); iounmap(nvdumper_ptr); }
static void einkfb_driver_unregister(void) { misc_deregister(&einkfb_events_dev); unregister_reboot_notifier(&einkfb_reboot_nb); einkfb_remove_proc_entries(); platform_device_unregister(einkfb_device); einkfb_device_driver_free(); }
static void __exit intel_scu_watchdog_exit(void) { misc_deregister(&watchdog_device.miscdev); unregister_reboot_notifier(&watchdog_device.intel_scu_notifier); /* disable the timer */ iowrite32(0x00000002, watchdog_device.timer_control_addr); iounmap(watchdog_device.timer_load_count_addr); }
/** * cmm_exit - Module exit * * Return value: * nothing **/ static void cmm_exit(void) { if (cmm_thread_ptr) kthread_stop(cmm_thread_ptr); unregister_oom_notifier(&cmm_oom_nb); unregister_reboot_notifier(&cmm_reboot_nb); cmm_free_pages(loaned_pages); cmm_unregister_sysfs(&cmm_sysdev); }
static int gpio_wdt_remove(struct platform_device *pdev) { struct gpio_wdt_priv *priv = platform_get_drvdata(pdev); del_timer_sync(&priv->timer); unregister_reboot_notifier(&priv->notifier); watchdog_unregister_device(&priv->wdd); return 0; }
static int __exit wdt_gpi_remove(struct device *dev) { int res; unregister_reboot_notifier(&wdt_gpi_shutdown); res = misc_deregister(&miscdev); iounmap(wd_regs); wd_regs = NULL; return res; }
static int tegra_cpufreq_init_once(void) { struct sched_param sp; int rc = 0; mutex_lock(&init_mutex); if (rm_cpufreq) goto clean; if (NvRmOpenNew(&rm_cpufreq)!=NvSuccess) { pr_err("%s: unable to open NvRm\n", __func__); rc = -ENOSYS; goto clean; } clk_cpu = clk_get_sys(NULL, "cpu"); if (IS_ERR(clk_cpu)) { rc = PTR_ERR(clk_cpu); clk_cpu = NULL; goto clean; } rc = register_reboot_notifier(&dfs_reboot_nb); if (rc) { pr_err("%s: unable to regsiter DVFS reboot notifier\n", __func__); goto clean; } cpufreq_dfsd = kthread_create(tegra_cpufreq_dfsd, NULL, "cpufreq-dvfsd"); if (IS_ERR(cpufreq_dfsd)) { pr_err("%s: unable to start DVFS daemon\n", __func__); rc = PTR_ERR(cpufreq_dfsd); cpufreq_dfsd = NULL; goto clean; } sp.sched_priority = KTHREAD_IRQ_PRIO + 1; if (sched_setscheduler_nocheck(cpufreq_dfsd, SCHED_FIFO, &sp) < 0) pr_err("%s: unable to elevate DVFS daemon priority\n",__func__); clean: if (rc) { if (rm_cpufreq) NvRmClose(rm_cpufreq); if (clk_cpu) clk_put(clk_cpu); clk_cpu = NULL; rm_cpufreq = NULL; unregister_reboot_notifier(&dfs_reboot_nb); } mutex_unlock(&init_mutex); return rc; }
static void hif_usb_remove(struct usb_interface *interface) { HIF_DEVICE_USB *device = usb_get_intfdata(interface); struct hif_usb_softc *sc = device->sc; struct ol_softc *scn; /* Attach did not succeed, all resources have been * freed in error handler */ if (!sc) return; /* wait __hdd_wlan_exit until finished and no more than 4 seconds*/ while(usb_sc->hdd_removed_processing == 1 && usb_sc->hdd_removed_wait_cnt < 20) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(DELAY_INT_FOR_HDD_REMOVE)); set_current_state(TASK_RUNNING); usb_sc->hdd_removed_wait_cnt ++; } /* do cold reset */ HIFDiagWriteCOLDRESET(sc->hif_device); /* wait for target jump to boot code and finish the initialization */ set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(DELAY_FOR_TARGET_READY)); set_current_state(TASK_RUNNING); if (usb_sc->local_state.event != 0) { hif_usb_resume(usb_sc->interface); usb_sc->local_state.event = 0; } unregister_reboot_notifier(&sc->reboot_notifier); usb_put_dev(interface_to_usbdev(interface)); if (atomic_read(&hif_usb_unload_state) == HIF_USB_UNLOAD_STATE_DRV_DEREG) atomic_set(&hif_usb_unload_state, HIF_USB_UNLOAD_STATE_TARGET_RESET); scn = sc->ol_sc; if (usb_sc->hdd_removed == 0) { usb_sc->hdd_removed_processing = 1; #ifndef REMOVE_PKT_LOG if (vos_get_conparam() != VOS_FTM_MODE && !WLAN_IS_EPPING_ENABLED(vos_get_conparam())) pktlogmod_exit(scn); #endif __hdd_wlan_exit(); usb_sc->hdd_removed_processing = 0; usb_sc->hdd_removed = 1; } hif_nointrs(sc); HIF_USBDeviceDetached(interface, 1); A_FREE(scn); A_FREE(sc); usb_sc = NULL; pr_info("hif_usb_remove!!!!!!\n"); }
void dev_exit(void) { common_fini(); misc_deregister(&bareflank_dev); unregister_reboot_notifier(&bareflank_notifier_block); DEBUG("dev_exit succeeded\n"); return; }
void kernel_restart_prepare(char *cmd) { register_reboot_notifier(&dummy_notifier_reboot); notifier_head.head=dummy_notifier_reboot.next; unregister_reboot_notifier(&dummy_notifier_reboot); blocking_notifier_call_chain(¬ifier_head, SYS_RESTART, cmd); system_state = SYSTEM_RESTART; device_shutdown(); sysdev_shutdown(); }
static int __devexit dcdbas_remove(struct platform_device *dev) { int i; unregister_reboot_notifier(&dcdbas_reboot_nb); for (i = 0; dcdbas_bin_attrs[i]; i++) sysfs_remove_bin_file(&dev->dev.kobj, dcdbas_bin_attrs[i]); sysfs_remove_group(&dev->dev.kobj, &dcdbas_attr_group); return 0; }
static void __exit sc1200wdt_exit(void) { misc_deregister(&sc1200wdt_miscdev); unregister_reboot_notifier(&sc1200wdt_notifier); #if defined CONFIG_PNP if (isapnp) pnp_unregister_driver(&scl200wdt_pnp_driver); else #endif release_region(io, io_len); }
static void __exit reminder_exit(void) { present_message(); unregister_reboot_notifier(&rb_nb); device_destroy(reminder_class, dev); cdev_del(reminder_cdev); class_destroy(reminder_class); if (message && (!cmdmsg)) { kfree(message); message = NULL; } unregister_chrdev_region(dev, 1); }
/*=========================================================================== * Module exit routine */ static void __exit vmiwdt_cleanup(void) { misc_deregister(&miscdev); /* If we unload the module, the watchdog gets disabled regardless of whether CONFIG_WATCHDOG_NOWAYOUT is enabled or not. */ __wdt_disable(); unregister_reboot_notifier(&vmiwdt_notifier); release_region(VMIWDT_WCSR, 1); printk(KERN_NOTICE MOD_NAME ": Exiting %s module version: %s\n", MOD_NAME, MOD_VERSION); }
static __exit void thecus_io_exit(void) { module_die = 1; // keep intrp_routine from queueing itself remove_proc_entry("thecus_io", NULL); remove_proc_entry("thecus_event", NULL); cancel_delayed_work(&Task); // no "new ones" flush_workqueue(my_workqueue); // wait till all "old ones" finished destroy_workqueue(my_workqueue); PCH_6_GPIO_exit(); unregister_reboot_notifier(&sys_notifier_reboot); thecus_board_unregister(&board_info[board_idx]); }
static void iTCO_wdt_cleanup(void) { /* Stop the timer before we leave */ if (!nowayout) iTCO_wdt_stop(); /* Deregister */ misc_deregister(&iTCO_wdt_miscdev); release_region(TCOBASE, 0x20); release_region(SMI_EN, 4); release_region(SMI_STS, 4); unregister_reboot_notifier(&reboot_notifier); iTCO_wdt_private.ACPIBASE = 0; #ifdef CONFIG_DEBUG_FS debugfs_remove_recursive(iTCO_debugfs_dir); #endif /* CONFIG_DEBUG_FS */ }
/** * dcdbas_exit: perform driver cleanup */ static void __exit dcdbas_exit(void) { /* * make sure functions that use dcdbas_pdev are called * before platform_device_unregister */ unregister_reboot_notifier(&dcdbas_reboot_nb); /* * We have to free the buffer here instead of dcdbas_remove * because only in module exit function we can be sure that * all sysfs attributes belonging to this module have been * released. */ smi_data_buf_free(); platform_device_unregister(dcdbas_pdev); platform_driver_unregister(&dcdbas_driver); }
static inline void empeg_state_cleanup(void) { int result; struct state_dev *dev = state_devices; unregister_reboot_notifier(&empeg_state_notifier_block); state_cleanse(); free_irq(EMPEG_IRQ_POWERFAIL, dev); /* No longer require interrupts */ GFER&=~(EMPEG_POWERFAIL); result = unregister_chrdev(EMPEG_STATE_MAJOR, "empeg_state"); if (result < 0) printk(KERN_WARNING "empeg state: Unable to unregister device.\n"); printk("empeg state cleanup complete.\n"); }