Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754983AbbBFWfu (ORCPT ); Fri, 6 Feb 2015 17:35:50 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:50101 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbbBFWft (ORCPT ); Fri, 6 Feb 2015 17:35:49 -0500 X-Greylist: delayed 584 seconds by postgrey-1.27 at vger.kernel.org; Fri, 06 Feb 2015 17:35:48 EST From: niederp@physik.uni-kl.de To: linux-fbdev@vger.kernel.org, plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, maxime.ripard@free-electrons.com Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= Subject: [PATCH 8/8] fbdev: ssd1307fb: Turn off display on driver unload. Date: Fri, 6 Feb 2015 23:28:14 +0100 Message-Id: <1423261694-5939-9-git-send-email-niederp@physik.uni-kl.de> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1423261694-5939-1-git-send-email-niederp@physik.uni-kl.de> References: <1423261694-5939-1-git-send-email-niederp@physik.uni-kl.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1009 Lines: 31 From: Thomas Niederprüm Signed-off-by: Thomas Niederprüm --- drivers/video/fbdev/ssd1307fb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 02931c7..be91dfc 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -762,6 +762,11 @@ static int ssd1307fb_remove(struct i2c_client *client) { struct fb_info *info = i2c_get_clientdata(client); struct ssd1307fb_par *par = info->par; + int ret = 0; + + ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_OFF); + if (ret < 0) + return ret; unregister_framebuffer(info); if (par->device_info->device_id == DEVID_SSD1307) { -- 2.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/