From: Thomas Niederprüm Date: Tue, 31 Mar 2015 18:27:14 +0000 (+0200) Subject: fbdev: ssd1307fb: Turn off display on driver unload. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13bad59730c31e876588977534b6b6a46ce876ae;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git fbdev: ssd1307fb: Turn off display on driver unload. This patch turns off the display when the driver is unloaded. Signed-off-by: Thomas Niederprüm Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 85eeda0fc2e4..5f3d5a810c54 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -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);