return r;
}
+static void taal_queue_esd_work(struct omap_dss_device *dssdev)
+{
+ struct taal_data *td = dev_get_drvdata(&dssdev->dev);
+
+ if (td->esd_interval > 0)
+ queue_delayed_work(td->esd_wq, &td->esd_work,
+ msecs_to_jiffies(td->esd_interval));
+}
+
+static void taal_cancel_esd_work(struct omap_dss_device *dssdev)
+{
+ struct taal_data *td = dev_get_drvdata(&dssdev->dev);
+
+ cancel_delayed_work(&td->esd_work);
+}
+
static int taal_bl_update_status(struct backlight_device *dev)
{
struct omap_dss_device *dssdev = dev_get_drvdata(&dev->dev);
taal_bl_update_status(bldev);
backlight_device_unregister(bldev);
- cancel_delayed_work(&td->esd_work);
+ taal_cancel_esd_work(dssdev);
destroy_workqueue(td->esd_wq);
/* reset, to be sure that the panel is in a valid state */
if (r)
goto err;
- if (td->esd_interval > 0)
- queue_delayed_work(td->esd_wq, &td->esd_work,
- msecs_to_jiffies(td->esd_interval));
+ taal_queue_esd_work(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
mutex_lock(&td->lock);
- cancel_delayed_work(&td->esd_work);
+ taal_cancel_esd_work(dssdev);
dsi_bus_lock();
goto err;
}
- cancel_delayed_work(&td->esd_work);
+ taal_cancel_esd_work(dssdev);
dsi_bus_lock();
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
} else {
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
- if (td->esd_interval > 0)
- queue_delayed_work(td->esd_wq, &td->esd_work,
- msecs_to_jiffies(td->esd_interval));
+ taal_queue_esd_work(dssdev);
}
mutex_unlock(&td->lock);
dsi_bus_unlock();
- queue_delayed_work(td->esd_wq, &td->esd_work,
- msecs_to_jiffies(td->esd_interval));
+ taal_queue_esd_work(dssdev);
mutex_unlock(&td->lock);
return;
dsi_bus_unlock();
- queue_delayed_work(td->esd_wq, &td->esd_work,
- msecs_to_jiffies(td->esd_interval));
+ taal_queue_esd_work(dssdev);
mutex_unlock(&td->lock);
}