aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/cr_bllcd.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-01-08backlight: crbllcd_bl - Use platform_device_register_simple()Akinobu Mita1-11/+7
Use platform_device_register_simple() and also fix error handling when platform_device_alloc() fails (cr_backlight_driver is left registered). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2007-10-16fbdev: change asm/uaccess.h to linux/uaccess.hKrzysztof Helt1-1/+0
This patch replaces <asm/uaccess.h> with <linux/uaccess.h> after the checkpatch.pl hint. The include of <asm/uaccess.h> is removed if the driver does not use it. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-11backlight: Fix cr_bllcd allocations and error pathsJesper Juhl1-15/+20
After fixing the too small memory allocation in cr_backlight_probe() from drivers/video/backlight/cr_bllcd.c (commit e3bbb3f05339de438faf54124f25c92e6fe4ac2e) I noticed that the Coverity checker also thought there were a few memory leaks in there. I took a closer look and confirmed that there were indeed several leaks. At the start of the function we allocate storage for a 'struct cr_panel' and store the pointer in a variable named 'crp'. Then we call pci_get_device() and pci_read_config_byte() and if either of them fail we return without freeing the memory allocated for the 'struct cr_panel'. These two leaks are easy to fix since we don't even use 'crp' for anything up to this point, so I simply moved the allocation further down in the function so it only happens just before we actually need it. A bit further down we call backlight_device_register() and store the result in 'crp->cr_backlight_device'. In case of error we return 'crp->cr_backlight_device' from the function, thus leaking 'crp' itself. The same thing happens with the call to lcd_device_register(). To fix these two leaks I declare two new pointers to hold the return values, so that in case of error we can return the pointer (as before) but without leaking 'crp'. This version of the patch also adds missing backlight_device_unregister() / lcd_device_unregister() / pci_dev_put() calls to error paths. Thanks to Richard Purdie <rpurdie@rpsys.net> for noticing. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-07-22Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlightLinus Torvalds1-1/+1
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: leds: cr_bllcd.c: build fix backlight: Convert from struct class_device to struct device backlight: Fix order of Kconfig entries
2007-07-22leds: cr_bllcd.c: build fixAndrew Morton1-1/+1
Build fix for cr_bllcd.c Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-07-20cr_backlight_probe() allocates too little storage for struct cr_panelJesper Juhl1-1/+1
The Coverity checker noticed that we allocate too little storage for "struct cr_panel *crp" in cr_backlight_probe(). Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Thomas Hellstrom <thomas@tungstengraphics.com> Cc: Alan Hourihane <alanh@tungstengraphics.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16backlight: Convert from struct class_device to struct deviceRichard Purdie1-1/+1
Convert the backlight and LCD classes from struct class_device to struct device since class_device is scheduled for removal. One nasty API break is the backlight power attribute has had to be renamed to bl_power and the LCD power attribute has had to be renamed to lcd_power since the original names clash with the core. I can't see a way around this. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-08vmlfb: framebuffer driver for Intel Vermilion RangeAlan Hourihane1-0/+287
Add the Intel Vermilion Range framebuffer support. Signed-off-by: Alan Hourihane <alanh@tungstengraphics.com> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>