X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fstaging%2Folpc_dcon%2Folpc_dcon.c;h=f45b2ef05f481fce35c12e62ee4b792f77ae2edf;hb=31c1febd7a45229edb3e5d86f354e3c1df543cbb;hp=9038e0b3f113a465f6ec772ff70854d206894276;hpb=9b22abe7b3ca3885e488ad36e5857d15f8158141;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index 9038e0b3f113..f45b2ef05f48 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -60,7 +60,7 @@ static s32 dcon_read(struct dcon_priv *dcon, u8 reg) 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); @@ -100,7 +100,6 @@ static int dcon_hw_init(struct dcon_priv *dcon, int is_init) } 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); @@ -243,9 +242,8 @@ static void dcon_load_holdoff(struct dcon_priv *dcon) 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); } } @@ -618,7 +616,7 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id) 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; @@ -681,7 +679,7 @@ static int dcon_remove(struct i2c_client *client) backlight_device_unregister(dcon->bl_dev); - if (dcon_device != NULL) + if (dcon_device) platform_device_unregister(dcon_device); cancel_work_sync(&dcon->switch_source); @@ -724,7 +722,6 @@ static int dcon_resume(struct device *dev) #endif /* CONFIG_PM */ - irqreturn_t dcon_interrupt(int irq, void *id) { struct dcon_priv *dcon = id;