fbdev: ssd1307fb: Turn off display on driver unload.
authorThomas Niederprüm <niederp@physik.uni-kl.de>
Tue, 31 Mar 2015 18:27:14 +0000 (20:27 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 27 May 2015 09:54:35 +0000 (12:54 +0300)
This patch turns off the display when the driver is unloaded.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/ssd1307fb.c

index 85eeda0fc2e470e7acc16f17589075f2697b3ff3..5f3d5a810c54c65bf998e16ccc598624c311a787 100644 (file)
@@ -620,6 +620,8 @@ static int ssd1307fb_remove(struct i2c_client *client)
        struct fb_info *info = i2c_get_clientdata(client);
        struct ssd1307fb_par *par = info->par;
 
+       ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_OFF);
+
        unregister_framebuffer(info);
        if (par->device_info->need_pwm) {
                pwm_disable(par->pwm);