static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
{
- uint16_t ver;
+ u16 ver;
int rc = 0;
ver = dcon_read(dcon, DCON_REG_ID);
}
dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode);
-
/* Set the scanline to interrupt on during resume */
dcon_write(dcon, DCON_REG_SCAN_INT, resumeline);
while (1) {
now = ktime_get();
delta_t = ktime_sub(now, dcon->load_time);
- if (ktime_to_ns(delta_t) > NSEC_PER_MSEC * 20) {
+ if (ktime_to_ns(delta_t) > NSEC_PER_MSEC * 20)
break;
- }
mdelay(4);
}
}
dcon_device = platform_device_alloc("dcon", -1);
- if (dcon_device == NULL) {
+ if (!dcon_device) {
pr_err("Unable to create the DCON device\n");
rc = -ENOMEM;
goto eirq;
backlight_device_unregister(dcon->bl_dev);
- if (dcon_device != NULL)
+ if (dcon_device)
platform_device_unregister(dcon_device);
cancel_work_sync(&dcon->switch_source);
#endif /* CONFIG_PM */
-
irqreturn_t dcon_interrupt(int irq, void *id)
{
struct dcon_priv *dcon = id;