Re: [patch 1/5] video sysfs support - take 2: Add dev argument for backlight_device_register.
- From: Richard Purdie <rpurdie@xxxxxxxxx>
- Date: Sat, 30 Dec 2006 15:35:35 +0000
On Wed, 2006-11-08 at 00:33 +0800, Yu Luming wrote:
This patch set adds generic abstract layer support for acpi video driver to have
generic user interface to control backlight and output switch control by leveraging
the existing backlight sysfs class driver, and by adding a new video output sysfs
class driver.
Patch 1/5: adds dev argument for backlight_device_register to link the class device
to real device object. The platform specific driver should find a way to get the real
device object for their video device.
signed-off-by: Luming Yu <Luming.yu@xxxxxxxxx>
---
drivers/acpi/asus_acpi.c | 2 +-
drivers/acpi/ibm_acpi.c | 2 +-
drivers/acpi/toshiba_acpi.c | 3 ++-
drivers/video/backlight/backlight.c | 7 +++++--
include/linux/backlight.h | 2 +-
5 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 27597c5..1d97cdf 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -190,8 +190,10 @@ static int fb_notifier_callback(struct n
* Creates and registers new backlight class_device. Returns either an
* ERR_PTR() or a pointer to the newly allocated device.
*/
-struct backlight_device *backlight_device_register(const char *name, void *devdata,
- struct backlight_properties *bp)
+struct backlight_device *backlight_device_register(const char *name,
+ struct device *dev,
+ void *devdata,
+ struct backlight_properties *bp)
{
int i, rc;
struct backlight_device *new_bd;
This patch breaks several platforms. If you're going to add parameters
to a function like backlight_device_register, you could at least grep
the tree and update all the users :-(.
To top it off, someone noticed some of the failures and fixed them but
nobody thought to fix the drivers in drivers/video/backlight itself and
a mac reference seems to have escaped too.
I'll send a patch to to Andrew to clean up this mess...
Richard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Prev by Date: Re: The Input Layer and the Serial Port
- Next by Date: Fix backlight_device_register compile failures/breakage
- Previous by thread: [GIT PULL] ieee1394 fixes
- Next by thread: Fix backlight_device_register compile failures/breakage
- Index(es):
Relevant Pages
- Re: rc6+ regression - backlight reset to 0 on boot after 7c0ea45be4f114d85ee35caeead8e1660699c46
... even if _BQC method (query current backlight level) is missing. ... Bugs
in the video driver ... (Linux-Kernel) - Re: LCD_Backlight
... PowerManager/SystemActivity_Inactive (both manual reset event) ... a backlight
driver may use the pair of manual-reset events ... when i touch the screen it does not set
the activity timer event and my ... (microsoft.public.windowsce.platbuilder) - Re: LCD_Backlight
... I am using the standard wince5.0 full power management.It is in the PM ... a
backlight driver may use the pair of manual-reset events ... when i touch the screen it
does not set the activity timer event and my ... (microsoft.public.windowsce.platbuilder) - Re: LCD_Backlight
... You really don't need to reset activity events manually. ... thread in your
backlight driver and put the code I posted. ... a backlight driver may use the pair of
manual-reset events ... (microsoft.public.windowsce.platbuilder) - [patch 1/5] video sysfs support - take 2: Add dev argument for backlight_device_register.
... This patch set adds generic abstract layer support for acpi video driver to have ...
generic user interface to control backlight and output switch control by leveraging ...
device object for their video device. ... (Linux-Kernel)