linux-stable/drivers/platform/x86
Hans de Goede 85eaa5fb82 apple_gmux: Use acpi_video_unregister_backlight instead of acpi_video_unregister
acpi_video_unregister() not only unregisters the acpi-video backlight
interface but also unregisters the acpi video bus event listener, causing
e.g. brightness hotkey presses to no longer generate keypress events.

The unregistering of the acpi video bus event listener usually is
undesirable, which by itself is a good reason to switch to
acpi_video_unregister_backlight().

Another problem with using acpi_video_unregister() rather then using
acpi_video_unregister_backlight() is that on systems with an intel video
opregion (most systems) whether or not the acpi video bus event listener
actually gets unregistered depends on module load ordering:

Scenario a:
1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
   is an intel opregion.
2) intel.ko gets loaded, calls acpi_video_register() which registers both
   the listener and the acpi backlight interface
3) apple-gmux.ko gets loaded, calls acpi_video_unregister() causing both
   the listener and the acpi backlight interface to unregister

Scenario b:
1) acpi/video.ko gets loaded (*), does not do acpi_video_register as there
   is an intel opregion.
2) apple-gmux.ko gets loaded, calls acpi_video_dmi_promote_vendor(),
   calls acpi_video_unregister(), which is a nop since acpi_video_register
   has not yet been called
2) intel.ko gets loaded, calls acpi_video_register() which registers
   the listener, but does not register the acpi backlight interface due to
   the call to the preciding call to acpi_video_dmi_promote_vendor()

*) acpi/video.ko always loads first as both other modules depend on it.

So we end up with or without an acpi video bus event listener depending
on module load ordering, not good.

Switching to using acpi_video_unregister_backlight() means that independ
of ordering we will always have an acpi video bus event listener fixing
this.

Note that this commit means that systems without an intel video opregion,
and systems which were hitting scenario a wrt module load ordering, are
now getting an acpi video bus event listener while before they were not!

On some systems this may cause the brightness hotkeys to start generating
keypresses while before they were not (good), while on other systems this
may cause the brightness hotkeys to generate multiple keypress events for
a single press (not so good). Since on most systems the acpi video bus is
the canonical source for brightness events I believe that the latter case
will needs to be handled on a case by case basis by filtering out the
duplicate keypresses at the other source for them.

Cc: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-06-07 21:32:07 -07:00
..
acer-wmi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
acerhdf.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
alienware-wmi.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
amilo-rfkill.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
apple-gmux.c apple_gmux: Use acpi_video_unregister_backlight instead of acpi_video_unregister 2015-06-07 21:32:07 -07:00
asus-laptop.c asus-laptop: use DEVICE_ATTR_xx macros 2015-01-28 21:21:11 -08:00
asus-nb-wmi.c asus-nb-wmi: Add another wapf=4 quirk 2014-12-03 10:10:13 -08:00
asus-wmi.c asus-wmi: add fan control 2015-05-13 11:05:26 -07:00
asus-wmi.h asus-wmi: always report brightness key events 2013-02-27 08:30:37 -05:00
classmate-laptop.c classmate-laptop: Fix sparse warning (0 as NULL) 2015-02-07 12:12:00 -08:00
compal-laptop.c power_supply: Change ownership from driver to core 2015-03-13 23:15:51 +01:00
dell-laptop.c platform: x86: dell-laptop: Add support for keyboard backlight 2015-04-07 20:57:32 -07:00
dell-smo8800.c dell-smo8800: Add more ACPI ids and change description of driver 2014-12-03 10:10:19 -08:00
dell-wmi-aio.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
dell-wmi.c dell-wmi: Don't report keypresses on keybord illumination change 2014-12-03 10:10:16 -08:00
eeepc-laptop.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
eeepc-wmi.c eeepc-wmi: Constify asus_quirks[] DMI table 2014-08-16 01:23:52 -07:00
fujitsu-laptop.c fujitsu-laptop: use FB_BLANK_* constants 2015-01-23 09:09:25 -08:00
fujitsu-tablet.c Input: use more descriptive KEY_ROTATE_DISPLAY instead of KEY_DIRECTION 2015-03-06 17:18:16 -08:00
hdaps.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
hp-wireless.c hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails 2014-12-03 10:10:15 -08:00
hp-wmi.c Input: use more descriptive KEY_ROTATE_DISPLAY instead of KEY_DIRECTION 2015-03-06 17:18:16 -08:00
hp_accel.c hp_accel: Add support for HP ZBook 15 2014-12-03 10:10:12 -08:00
ibm_rtl.c
ideapad-laptop.c ideapad_laptop: Lenovo G50-30 fix rfkill reports wireless blocked 2015-06-01 19:24:30 +02:00
intel-rst.c intel-rst: Clean up ACPI add function 2014-09-17 13:55:54 -07:00
intel-smartconnect.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
intel_ips.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
intel_ips.h
intel_menlow.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
intel_mid_powerbtn.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
intel_mid_thermal.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
intel_oaktrail.c intel-oaktrail: Fix trivial typo in comment 2015-03-14 12:06:32 -07:00
intel_pmic_gpio.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
intel_scu_ipc.c intel_scu_ipc: Read resources from PCI configuration 2015-01-28 21:21:11 -08:00
intel_scu_ipcutil.c
Kconfig toshiba_bluetooth: Add RFKill handler functions 2015-05-06 15:12:39 -07:00
Makefile platform/x86: Enable build support for toshiba_haps 2014-08-16 01:23:56 -07:00
msi-laptop.c platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
msi-wmi.c platform: x86: Deletion of checks before backlight_device_unregister() 2014-12-03 10:10:14 -08:00
mxm-wmi.c Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2014-01-29 18:54:05 -08:00
panasonic-laptop.c Fix sleep / suspend keys for Toughbook CF-51 2014-04-06 12:58:11 -04:00
pvpanic.c pvpanic: handle missing _STA correctly 2015-06-07 21:30:12 -07:00
samsung-laptop.c samsung-laptop.c: Prefer kstrtoint over single variable sscanf 2015-02-06 18:53:59 -08:00
samsung-q10.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
sony-laptop.c Sony-laptop: Fix sparse warning (make undeclared var static) 2015-02-07 12:09:20 -08:00
tc1100-wmi.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
thinkpad_acpi.c thinkpad_acpi: off by one in adaptive_keyboard_hotkey_notify_hotkey() 2015-03-14 12:00:19 -07:00
topstar-laptop.c platform:x86: Remove OOM message after input_allocate_device 2013-11-20 18:51:03 -05:00
toshiba_acpi.c toshiba_acpi: Bump driver version to 0.22 2015-05-11 10:38:21 -07:00
toshiba_bluetooth.c toshiba_bluetooth: Change BT status message to debug 2015-05-11 10:38:18 -07:00
toshiba_haps.c toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macros 2015-05-11 10:38:22 -07:00
wmi.c wmi: Use bool function return values of true/false not 1/0 2015-04-07 20:43:12 -07:00
xo1-rfkill.c platform: x86: drop owner assignment from platform_drivers 2014-10-20 16:21:27 +02:00
xo15-ebook.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00