void gpu_notifier_term(void) { #ifdef CONFIG_MALI_RT_PM unregister_pm_notifier(&gpu_pm_nb); #endif /* CONFIG_MALI_RT_PM */ #ifdef CONFIG_CPU_IDLE unregister_pm_notifier(&gpu_lpc_nb); #endif /* CONFIG_MALI_RT_PM */ return; }
int twl6030_exit_irq(void) { int i; #if defined(CONFIG_WAKELOCK) wake_lock_destroy(&vlow_wakelock); #endif unregister_pm_notifier(&twl6030_irq_pm_notifier_block); if (task) kthread_stop(task); if (!twl6030_irq_base || !twl6030_irq_end) { pr_err("twl6030: can't yet clean up IRQs?\n"); return -ENOSYS; } free_irq(twl6030_irq_base + TWL_VLOW_INTR_OFFSET, handle_twl6030_vlow); free_irq(twl_irq, &irq_event); for (i = twl6030_irq_base; i < twl6030_irq_end; i++) irq_set_chip_and_handler(i, NULL, NULL); return 0; }
static int __devexit exynos_tmu_remove(struct platform_device *pdev) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); int i; exynos_unregister_thermal(); unregister_pm_notifier(&exynos_pm_nb); for (i = 0; i < EXYNOS_TMU_COUNT; i++) exynos_tmu_control(pdev, i, false); platform_set_drvdata(pdev, NULL); clk_put(data->clk); for (i = 0; i < EXYNOS_TMU_COUNT; i++) free_irq(data->irq[i], data); for (i = 0; i < EXYNOS_TMU_COUNT; i++) iounmap(data->base[i]); for (i = 0; i < EXYNOS_TMU_COUNT; i++) release_mem_region(data->mem[i]->start, resource_size(data->mem[i])); kfree(data); return 0; }
/** This function is called when Mali GPU device is initialized */ int _mali_dev_platform_register(void) { int err; #ifdef CONFIG_PM_RUNTIME set_mali_parent_power_domain((void *)&mali_gpu_device); #endif #ifdef CONFIG_PM_RUNTIME err = register_pm_notifier(&mali_pwr_notif_block); if (err) { return err; } #endif #if MALI_LICENSE_IS_GPL err = platform_device_register(&mali_gpu_device); if (!err) { err = platform_driver_register(&mali_plat_driver); if (err) { #ifdef CONFIG_PM_RUNTIME unregister_pm_notifier(&mali_pwr_notif_block); #endif platform_device_unregister(&mali_gpu_device); } } #endif return err; }
static void set_pm_notifier(int mask) { int ret = 0; bool val = (mask & KCOLLECT_SUSPEND_MASK) ? true : false; if (val) { // previous state is off, and now is on if (PRE_MASK_IS_OFF(KCOLLECT_SUSPEND_MASK, mask)) { ret = register_pm_notifier(&suspend_notifier); if (ret < 0) { pr_err("hw_kcollect %s : register_pm_notifier failed!\n", __func__); } else { pr_debug("hw_kcollect %s : register_pm_notifier\n", __func__); } } } else { // previous state is on, and now is off if (PRE_MASK_IS_ON(KCOLLECT_SUSPEND_MASK, mask)) { ret = unregister_pm_notifier(&suspend_notifier); if (ret < 0) { pr_err("hw_kcollect %s : unregister_pm_notifier failed!\n", __func__); } else { pr_debug("hw_kcollect %s : unregister_pm_notifier\n", __func__); } } } }
static int __exit tpd_remove(struct platform_device *pdev) { struct panel_drv_data *ddata = platform_get_drvdata(pdev); struct omap_dss_device *dssdev = &ddata->dssdev; struct omap_dss_device *in = ddata->in; tpd_uninit_pins(pdev); unregister_pm_notifier(&hdmi_i2c2_hack_pm_notif_block); hdmi_i2c2_hack_suspend_mcasp(); omapdss_unregister_output(&ddata->dssdev); WARN_ON(omapdss_device_is_enabled(dssdev)); if (omapdss_device_is_enabled(dssdev)) tpd_disable(dssdev); WARN_ON(omapdss_device_is_connected(dssdev)); if (omapdss_device_is_connected(dssdev)) tpd_disconnect(dssdev, dssdev->dst); omap_dss_put_device(in); return 0; }
static void wil_pcie_remove(struct pci_dev *pdev) { struct wil6210_priv *wil = pci_get_drvdata(pdev); void __iomem *csr = wil->csr; wil_dbg_misc(wil, "%s()\n", __func__); #ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP unregister_pm_notifier(&wil->pm_notify); #endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM */ wil6210_debugfs_remove(wil); rtnl_lock(); wil_p2p_wdev_free(wil); rtnl_unlock(); wil_if_remove(wil); wil_if_pcie_disable(wil); pci_iounmap(pdev, csr); pci_release_region(pdev, 0); pci_disable_device(pdev); if (wil->platform_ops.uninit) wil->platform_ops.uninit(wil->platform_handle); wil_if_free(wil); }
static void __exit mic_exit(void) { /* Close endpoints related to reverse registration */ acptboot_exit(); #ifdef USE_VCONSOLE micvcons_destroy(mic_data.dd_numdevs); #endif pci_unregister_driver(&mic_lindata.dd_pcidriver); micpm_uninit(); /* Uninit data structures for PM disconnect */ micpm_disconn_uninit(mic_data.dd_numdevs + 1); #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)) pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "mic"); #endif micscif_kmem_cache_destroy(); vmcore_exit(); micveth_exit(); micscif_destroy(); ramoops_exit(); device_destroy(mic_lindata.dd_class, mic_lindata.dd_dev + 1); device_destroy(mic_lindata.dd_class, mic_lindata.dd_dev); class_destroy(mic_lindata.dd_class); cdev_del(&mic_lindata.dd_cdev); unregister_chrdev_region(mic_lindata.dd_dev, MAX_DLDR_MINORS); unregister_pm_notifier(&mic_pm_notifer); return; }
static void xhci_ush_pci_remove(struct pci_dev *dev) { struct xhci_hcd *xhci; xhci = hcd_to_xhci(pci_get_drvdata(dev)); if (xhci->shared_hcd) { usb_remove_hcd(xhci->shared_hcd); usb_put_hcd(xhci->shared_hcd); } if (!pci_dev_run_wake(dev)) pm_runtime_get_noresume(&dev->dev); pm_runtime_forbid(&dev->dev); usb_hcd_pci_remove(dev); /* Free the aux irq */ hsic_aux_irq_free(); hsic_wakeup_irq_free(); gpio_free(hsic.aux_gpio); gpio_free(hsic.wakeup_gpio); hsic.port_disconnect = 1; hsic_enable = 0; wake_lock_destroy(&(hsic.resume_wake_lock)); wake_lock_destroy(&hsic.s3_wake_lock); usb_unregister_notify(&hsic.hsic_pm_nb); unregister_pm_notifier(&hsic.hsic_s3_entry_nb); kfree(xhci); }
int twl6030_exit_irq(void) { int i; unregister_pm_notifier(&twl6030_irq_pm_notifier_block); if (task) kthread_stop(task); if (!twl6030_irq_base || !twl6030_irq_end) { pr_err("twl6030: can't yet clean up IRQs?\n"); return -ENOSYS; } #if 0 // LGE_CHANGE_START [2012.05.30] bk.shin for low battery problem free_irq(twl6030_irq_base + TWL_VLOW_INTR_OFFSET, handle_twl6030_vlow); #endif free_irq(twl_irq, &irq_event); for (i = twl6030_irq_base; i < twl6030_irq_end; i++) irq_set_chip_and_handler(i, NULL, NULL); return 0; }
void gpu_notifier_term(void) { #ifdef CONFIG_MALI_T6XX_RT_PM unregister_pm_notifier(&gpu_pm_nb); #endif /* CONFIG_MALI_T6XX_RT_PM */ return; }
static void __exit heartbeat_trig_exit(void) { unregister_pm_notifier(&heartbeat_pm_nb); unregister_reboot_notifier(&heartbeat_reboot_nb); atomic_notifier_chain_unregister(&panic_notifier_list, &heartbeat_panic_nb); led_trigger_unregister(&heartbeat_led_trigger); }
static void suspend_time_syscore_exit(void) { #ifdef CONFIG_SUSPEND_TIME_TIMEKEEPING unregister_pm_notifier(&suspend_time_pm_notifier_block); #else unregister_syscore_ops(&suspend_time_syscore_ops); #endif }
static int omap_dss_remove(struct platform_device *pdev) { unregister_pm_notifier(&omap_dss_pm_notif_block); dss_uninitialize_debugfs(); return 0; }
/** * * Exynos5 hardware specific termination * */ void kbase_platform_exynos5_term(kbase_device *kbdev) { unregister_pm_notifier(&mali_pm_nb); #ifdef CONFIG_MALI_T6XX_DEBUG_SYS kbase_platform_remove_sysfs_file(kbdev->osdev.dev); #endif /* CONFIG_MALI_T6XX_DEBUG_SYS */ kbase_platform_term(kbdev); }
void gpu_notifier_term(void) { pm_qos_remove_notifier(PM_QOS_GPU_FREQ_MIN, &exynos_gpu_min_qos_notifier); pm_qos_remove_notifier(PM_QOS_GPU_FREQ_MAX, &exynos_gpu_max_qos_notifier); #ifdef CONFIG_MALI_MIDGARD_RT_PM unregister_pm_notifier(&gpu_pm_nb); #endif /* CONFIG_MALI_MIDGARD_RT_PM */ return; }
static void __exit hisi_clkmbox_exit(void) { if (mbox_clk) { hisi_mbox_put(&mbox_clk->mbox); kfree(mbox_clk); mbox_clk = NULL; } unregister_pm_notifier(&mailbox_pm_notif_block); }
int __devexit g3_display_remove(struct platform_device *pdev){ struct g3_display_data *data = pdev->dev.platform_data; unregister_pm_notifier(&data->nb_pm); devfreq_remove_device(data->devfreq); kfree(data); return 0; }
int mali_platform_device_register(void) { int err; MALI_DEBUG_PRINT(4, ("mali_platform_device_register() called\n")); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) exynos_pm_add_dev_to_genpd(&mali_gpu_device, &exynos4_pd_g3d); #endif /* Connect resources to the device */ err = platform_device_add_resources(&mali_gpu_device, mali_gpu_resources, sizeof(mali_gpu_resources) / sizeof(mali_gpu_resources[0])); if (0 == err) { err = platform_device_add_data(&mali_gpu_device, &mali_gpu_data, sizeof(mali_gpu_data)); if (0 == err) { #ifdef CONFIG_PM_RUNTIME #if defined(USE_PM_NOTIFIER) err = register_pm_notifier(&mali_pwr_notif_block); if (err) { goto plat_init_err; } #endif #endif /* CONFIG_PM_RUNTIME */ /* Register the platform device */ err = platform_device_register(&mali_gpu_device); if (0 == err) { mali_platform_init(&(mali_gpu_device.dev)); #ifdef CONFIG_PM_RUNTIME #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) pm_runtime_set_autosuspend_delay(&(mali_gpu_device.dev), 1000); pm_runtime_use_autosuspend(&(mali_gpu_device.dev)); #endif pm_runtime_enable(&(mali_gpu_device.dev)); #endif return 0; } } #ifdef CONFIG_PM_RUNTIME #if defined(USE_PM_NOTIFIER) plat_init_err: unregister_pm_notifier(&mali_pwr_notif_block); #endif #endif /* CONFIG_PM_RUNTIME */ platform_device_unregister(&mali_gpu_device); } return err; }
int twl6030_exit_irq(void) { unregister_pm_notifier(&twl6030_irq_pm_notifier_block); if (twl6030_irq_base) { pr_err("twl6030: can't yet clean up IRQs?\n"); return -ENOSYS; } return 0; }
/** This function is called when Mali GPU device is unloaded */ void _mali_dev_platform_unregister(void) { #ifdef CONFIG_PM_RUNTIME unregister_pm_notifier(&mali_pwr_notif_block); #endif #if MALI_LICENSE_IS_GPL platform_driver_unregister(&mali_plat_driver); platform_device_unregister(&mali_gpu_device); #endif }
void mali_platform_device_unregister(void) { MALI_DEBUG_PRINT(4, ("mali_platform_device_unregister() called\n")); #ifdef CONFIG_PM_RUNTIME unregister_pm_notifier(&mali_pwr_notif_block); #endif /* CONFIG_PM_RUNTIME */ mali_platform_deinit(&(mali_gpu_device.dev)); platform_device_unregister(&mali_gpu_device); }
static int __exit tegra_wakeup_monitor_remove(struct platform_device *pdev) { struct tegra_wakeup_monitor *twm = platform_get_drvdata(pdev); unregister_pm_notifier(&twm->pm_notifier); device_remove_file(&pdev->dev, &dev_attr_monitor_enable); device_remove_file(&pdev->dev, &dev_attr_wow_enable); device_remove_file(&pdev->dev, &dev_attr_cmd); kfree(twm); return 0; }
static int vmw_driver_unload(struct drm_device *dev) { struct vmw_private *dev_priv = vmw_priv(dev); enum vmw_res_type i; unregister_pm_notifier(&dev_priv->pm_nb); if (dev_priv->ctx.res_ht_initialized) drm_ht_remove(&dev_priv->ctx.res_ht); vfree(dev_priv->ctx.cmd_bounce); if (dev_priv->enable_fb) { vmw_fb_off(dev_priv); vmw_fb_close(dev_priv); vmw_fifo_resource_dec(dev_priv); vmw_svga_disable(dev_priv); } vmw_kms_close(dev_priv); vmw_overlay_close(dev_priv); if (dev_priv->has_gmr) (void)ttm_bo_clean_mm(&dev_priv->bdev, VMW_PL_GMR); (void)ttm_bo_clean_mm(&dev_priv->bdev, TTM_PL_VRAM); vmw_release_device_early(dev_priv); if (dev_priv->has_mob) (void) ttm_bo_clean_mm(&dev_priv->bdev, VMW_PL_MOB); (void) ttm_bo_device_release(&dev_priv->bdev); vmw_release_device_late(dev_priv); vmw_fence_manager_takedown(dev_priv->fman); if (dev_priv->capabilities & SVGA_CAP_IRQMASK) drm_irq_uninstall(dev_priv->dev); if (dev_priv->stealth) pci_release_region(dev->pdev, 2); else pci_release_regions(dev->pdev); ttm_object_device_release(&dev_priv->tdev); iounmap(dev_priv->mmio_virt); arch_phys_wc_del(dev_priv->mmio_mtrr); if (dev_priv->ctx.staged_bindings) vmw_binding_state_free(dev_priv->ctx.staged_bindings); vmw_ttm_global_release(dev_priv); for (i = vmw_res_context; i < vmw_res_max; ++i) idr_destroy(&dev_priv->res_idr[i]); kfree(dev_priv); return 0; }
static int arche_platform_remove(struct platform_device *pdev) { struct arche_platform_drvdata *arche_pdata = platform_get_drvdata(pdev); unregister_pm_notifier(&arche_pdata->pm_notifier); device_remove_file(&pdev->dev, &dev_attr_state); device_for_each_child(&pdev->dev, NULL, arche_remove_child); arche_platform_poweroff_seq(arche_pdata); if (usb3613_hub_mode_ctrl(false)) dev_warn(arche_pdata->dev, "failed to control hub device\n"); /* TODO: Should we do anything more here ?? */ return 0; }
static void ssm_disable(struct ssm_data *sd) { dev_dbg(sd->dev, "%s\n", __func__); mutex_lock(&sd->lock); if (sd->enabled) { unregister_early_suspend(&sd->early_suspend); unregister_pm_notifier(&sd->pm_notifier); sd->enabled = false; } else { dev_warn(sd->dev, "%s: Not enabled\n", __func__); } mutex_unlock(&sd->lock); }
static int mpu_remove(struct i2c_client *client) { struct mpu_private_data *mpu = i2c_get_clientdata(client); struct i2c_adapter *slave_adapter[EXT_SLAVE_NUM_TYPES]; struct mldl_cfg *mldl_cfg = &mpu->mldl_cfg; struct ext_slave_platform_data **pdata_slave = mldl_cfg->pdata_slave; int ii; for (ii = 0; ii < EXT_SLAVE_NUM_TYPES; ii++) { if (!pdata_slave[ii]) slave_adapter[ii] = NULL; else slave_adapter[ii] = i2c_get_adapter(pdata_slave[ii]->adapt_num); } slave_adapter[EXT_SLAVE_TYPE_GYROSCOPE] = client->adapter; dev_dbg(&client->adapter->dev, "%s\n", __func__); inv_mpu_close(mldl_cfg, slave_adapter[EXT_SLAVE_TYPE_GYROSCOPE], slave_adapter[EXT_SLAVE_TYPE_ACCEL], slave_adapter[EXT_SLAVE_TYPE_COMPASS], slave_adapter[EXT_SLAVE_TYPE_PRESSURE]); if (mldl_cfg->slave[EXT_SLAVE_TYPE_ACCEL] && (mldl_cfg->slave[EXT_SLAVE_TYPE_ACCEL]->id == ACCEL_ID_MPU6050)) { struct ext_slave_platform_data *slave_pdata = mldl_cfg->pdata_slave[EXT_SLAVE_TYPE_ACCEL]; inv_mpu_unregister_slave( client, mldl_cfg->pdata_slave[EXT_SLAVE_TYPE_ACCEL], mpu6050_get_slave_descr); kfree(slave_pdata); } if (client->irq) mpuirq_exit(); misc_deregister(&mpu->dev); unregister_pm_notifier(&mpu->nb); kfree(mpu->mldl_cfg.mpu_ram->ram); kfree(mpu); return 0; }
static int ssm_remove(struct platform_device *pdev) { struct ssm_data *sd = platform_get_drvdata(pdev); dev_dbg(sd->dev, "%s\n", __func__); if (sd->enabled) { unregister_early_suspend(&sd->early_suspend); unregister_pm_notifier(&sd->pm_notifier); } ssm_remove_attrs(sd->dev); kfree(sd); return 0; }