lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 24 Jan 2008 10:30:44 +0100
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	linux-fbdev-devel@...ts.sourceforge.net,
	Andrew Morton <akpm@...ux-foundation.org>,
	Haavard Skinnemoen <hskinnemoen@...el.com>
CC:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	David Brownell <david-b@...bell.net>,
	Andrew Victor <linux@...im.org.za>,
	ARM Linux Mailing List 
	<linux-arm-kernel@...ts.arm.linux.org.uk>
Subject: Re: [Linux-fbdev-devel] [PATCH] atmel_lcdfb: backlight control -
 tiny rework

Tiny patch that removes not needed "inline" and renames 
function : exit_contrast() -> exit_backlight().
It adds the missing exit_backlight() in  probe() 
error path.

Signed-off-by: Nicolas Ferre <nicolas.ferre@...el.com>
---
Follows comments from Andrew Morton and Haavard Skinnemoen.
Thanks to both of you.

 drivers/video/atmel_lcdfb.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -118,7 +118,7 @@ static struct backlight_ops atmel_lcdc_b
 	.get_brightness = atmel_bl_get_brightness,
 };
 
-static inline void init_backlight(struct atmel_lcdfb_info *sinfo)
+static void init_backlight(struct atmel_lcdfb_info *sinfo)
 {
 	struct backlight_device	*bl;
 
@@ -142,7 +142,7 @@ static inline void init_backlight(struct
 	bl->props.brightness = atmel_bl_get_brightness(bl);
 }
 
-static inline void exit_contrast(struct atmel_lcdfb_info *sinfo)
+static void exit_backlight(struct atmel_lcdfb_info *sinfo)
 {
 	if (sinfo->backlight)
 		backlight_device_unregister(sinfo->backlight);
@@ -150,18 +150,18 @@ static inline void exit_contrast(struct 
 
 #else
 
-static inline void init_backlight(struct atmel_lcdfb_info *sinfo)
+static void init_backlight(struct atmel_lcdfb_info *sinfo)
 {
 	dev_warn(&sinfo->pdev->dev, "backlight control is not available\n");
 }
 
-static inline void exit_contrast(struct atmel_lcdfb_info *sinfo)
+static void exit_backlight(struct atmel_lcdfb_info *sinfo)
 {
 }
 
 #endif
 
-static inline void init_contrast(struct atmel_lcdfb_info *sinfo)
+static void init_contrast(struct atmel_lcdfb_info *sinfo)
 {
 	/* have some default contrast/backlight settings */
 	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
@@ -823,6 +823,7 @@ free_cmap:
 unregister_irqs:
 	free_irq(sinfo->irq_base, info);
 unmap_mmio:
+	exit_backlight(sinfo);
 	iounmap(sinfo->mmio);
 release_mem:
  	release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
@@ -857,7 +858,7 @@ static int __exit atmel_lcdfb_remove(str
 	if (!sinfo)
 		return 0;
 
-	exit_contrast(sinfo);
+	exit_backlight(sinfo);
 	if (sinfo->atmel_lcdfb_power_control)
 		sinfo->atmel_lcdfb_power_control(0);
 	unregister_framebuffer(info);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ