Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 519ab5f2 authored by Yu Luming's avatar Yu Luming Committed by Len Brown
Browse files

ACPI: video: 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 the existing backlight sysfs class driver, and by adding a new
video output sysfs class driver.

This patch:

Add 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.

[akpm@osdl.org: build fix]
[akpm@osdl.org: fix msi-laptop.c]
Signed-off-by: default avatarLuming Yu <Luming.yu@intel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent f4715189
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1402,7 +1402,7 @@ static int __init asus_acpi_init(void)
		return result;
	}

	asus_backlight_device = backlight_device_register("asus", NULL,
	asus_backlight_device = backlight_device_register("asus",NULL,NULL,
							  &asus_backlight_data);
        if (IS_ERR(asus_backlight_device)) {
		printk(KERN_ERR "Could not register asus backlight device\n");
+1 −1
Original line number Diff line number Diff line
@@ -1714,7 +1714,7 @@ static struct backlight_properties ibm_backlight_data = {

static int brightness_init(void)
{
	ibm_backlight_device = backlight_device_register("ibm", NULL,
	ibm_backlight_device = backlight_device_register("ibm", NULL, NULL,
							 &ibm_backlight_data);
	if (IS_ERR(ibm_backlight_device)) {
		printk(IBM_ERR "Could not register backlight device\n");
+2 −1
Original line number Diff line number Diff line
@@ -591,6 +591,7 @@ static int __init toshiba_acpi_init(void)
	}

	toshiba_backlight_device = backlight_device_register("toshiba",NULL,
						NULL,
						&toshiba_backlight_data);
        if (IS_ERR(toshiba_backlight_device)) {
		printk(KERN_ERR "Could not register toshiba backlight device\n");
+2 −1
Original line number Diff line number Diff line
@@ -317,7 +317,8 @@ static int __init msi_init(void)

	/* Register backlight stuff */

	msibl_device = backlight_device_register("msi-laptop-bl", NULL, &msibl_props);
	msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL,
						&msibl_props);
	if (IS_ERR(msibl_device))
		return PTR_ERR(msibl_device);

+1 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ static int appledisplay_probe(struct usb_interface *iface,
	/* Register backlight device */
	snprintf(bl_name, sizeof(bl_name), "appledisplay%d",
		atomic_inc_return(&count_displays) - 1);
	pdata->bd = backlight_device_register(bl_name, pdata,
	pdata->bd = backlight_device_register(bl_name, NULL, NULL,
						&appledisplay_bl_data);
	if (IS_ERR(pdata->bd)) {
		err("appledisplay: Backlight registration failed");
Loading