linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Corentin Chary <corentin.chary@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Seth Forshee <seth.forshee@canonical.com>
Subject: linux-next: manual merge of the drivers-x86 tree with Linus' tree
Date: Thu, 31 May 2012 12:06:35 +1000	[thread overview]
Message-ID: <20120531120635.209266aabe1b08ebc4595249@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]

Hi Matthew,

Today's linux-next merge of the drivers-x86 tree got a conflict in
drivers/platform/x86/toshiba_acpi.c between commit f5f4fd451634
("backlight: initialize struct backlight_properties properly") from
Linus' tree and commit 7d307fbdefbf ("toshiba_acpi: Only register
backlight device when interface is read/write") from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/toshiba_acpi.c
index 57787d8,bde32de..0000000
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@@ -1020,6 -1069,54 +1069,55 @@@ static int __devinit toshiba_acpi_setup
  	return error;
  }
  
+ static int __devinit toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev)
+ {
+ 	struct backlight_properties props;
+ 	int brightness;
+ 	int ret;
+ 	bool enabled;
+ 
+ 	/*
+ 	 * Some machines don't support the backlight methods at all, and
+ 	 * others support it read-only. Either of these is pretty useless,
+ 	 * so only register the backlight device if the backlight method
+ 	 * supports both reads and writes.
+ 	 */
+ 	brightness = __get_lcd_brightness(dev);
+ 	if (brightness < 0)
+ 		return 0;
+ 	ret = set_lcd_brightness(dev, brightness);
+ 	if (ret) {
+ 		pr_debug("Backlight method is read-only, disabling backlight support\n");
+ 		return 0;
+ 	}
+ 
+ 	/* Determine whether or not BIOS supports transflective backlight */
+ 	ret = get_tr_backlight_status(dev, &enabled);
+ 	dev->tr_backlight_supported = !ret;
+ 
++	memset(&props, 0, sizeof(props));
+ 	props.type = BACKLIGHT_PLATFORM;
+ 	props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
+ 
+ 	/* adding an extra level and having 0 change to transflective mode */
+ 	if (dev->tr_backlight_supported)
+ 		props.max_brightness++;
+ 	dev->backlight_dev = backlight_device_register("toshiba",
+ 						       &dev->acpi_dev->dev,
+ 						       dev,
+ 						       &toshiba_backlight_data,
+ 						       &props);
+ 	if (IS_ERR(dev->backlight_dev)) {
+ 		ret = PTR_ERR(dev->backlight_dev);
+ 		pr_err("Could not register toshiba backlight device\n");
+ 		dev->backlight_dev = NULL;
+ 		return ret;
+ 	}
+ 
+ 	dev->backlight_dev->props.brightness = brightness;
+ 	return 0;
+ }
+ 
  static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
  {
  	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2012-05-31  2:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31  2:06 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-08  2:34 linux-next: manual merge of the drivers-x86 tree with Linus' tree Stephen Rothwell
2024-03-08  2:19 Stephen Rothwell
2024-03-01  3:14 Stephen Rothwell
2024-02-08  1:57 Stephen Rothwell
2024-01-02  2:30 Stephen Rothwell
2018-10-29  3:29 Stephen Rothwell
2018-10-29  9:34 ` Andy Shevchenko
2016-01-15  1:56 Stephen Rothwell
2015-06-02  6:07 Stephen Rothwell
2015-06-03  3:27 ` Darren Hart
2015-06-03  4:04   ` Stephen Rothwell
2011-04-08  5:26 Stephen Rothwell
2011-03-24  2:48 Stephen Rothwell
2011-03-24  2:52 ` Matthew Garrett
2010-08-25  1:22 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120531120635.209266aabe1b08ebc4595249@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=corentin.chary@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=seth.forshee@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).