static int vib_suspend(struct device *dev) { hrtimer_cancel(&misc_data->timer); vib_set(0); flush_delayed_work_sync(&misc_data->power_work); return 0; }
static int vib_remove(struct platform_device *pdev) { struct vib_data *data = platform_get_drvdata(pdev); if (data->pdata->exit) data->pdata->exit(); hrtimer_cancel(&data->timer); vib_set(0); flush_delayed_work_sync(&data->power_work); twl6040_free_irq(data->twl6040, TWL6040_IRQ_VIB, data); timed_output_dev_unregister(&data->dev); kfree(data); return 0; }
static void vib_update(struct work_struct *work) { vib_set(misc_data->vib_state); }