struct i2c_client *client;
struct mutex xfer_lock;
struct delayed_work work;
- struct workqueue_struct *irqthread;
struct lp8727_platform_data *pdata;
struct lp8727_psy *psy;
struct lp8727_chg_param *chg_parm;
{
struct lp8727_chg *pchg = ptr;
- queue_delayed_work(pchg->irqthread, &pchg->work,
- pchg->debounce_jiffies);
-
+ schedule_delayed_work(&pchg->work, pchg->debounce_jiffies);
return IRQ_HANDLED;
}
INIT_DELAYED_WORK(&pchg->work, lp8727_delayed_func);
- pchg->irqthread = create_singlethread_workqueue("lp8727-irqthd");
- if (!pchg->irqthread) {
- dev_err(pchg->dev, "can not create thread for lp8727\n");
- return -ENOMEM;
- }
-
pchg->debounce_jiffies = msecs_to_jiffies(delay_msec);
return request_threaded_irq(pchg->client->irq,
struct lp8727_chg *pchg = i2c_get_clientdata(cl);
free_irq(pchg->client->irq, pchg);
- flush_workqueue(pchg->irqthread);
- destroy_workqueue(pchg->irqthread);
lp8727_unregister_psy(pchg);
return 0;
}