- 14 4月, 2017 24 次提交
-
-
由 Andy Shevchenko 提交于
The driver is bound to the devices based on their PCI IDs. There is no need to do an additional check. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Device pointer is used as a flag that everything is prepared. Nevertheless the assignment happened quite before and there is a window when a caller can get weird results or even crashes since not all fields are initialized yet. Rearrange initialization sequence in ->probe() to prepare everything before use. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Fail ->probe() if there is no platform data supplied. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Dmitry Torokhov 提交于
There is no point in registering I2C bus notifier if DMI data does not match. Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> [andy: updated due to previous patch changed] Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Dmitry Torokhov 提交于
I2C bus has both i2c clients and adapter devices, so we must be careful in notifier code and verify that we are actually dealing with an i2c client before using it as such. Fixes: cef9dd85 ("platform/x86: add support for devices with Silead...") Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> [andy: simplified silead_ts_dmi_add_props() change] Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Santeri Toivonen 提交于
Asus laptop X302UA starts up with Wi-Fi disabled, without a way to enable it. Set wapf=4 to fix the problem. Signed-off-by: NSanteri Toivonen <santeri.toivonen@vatsul.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Rename call_fext_func() arguments so that each argument's name signifies its role: - cmd -> func: sub-function to call (flags, buttons etc.), - arg0 -> op: operation to perform (get, set, get capabilities etc.), - arg1 -> feature: feature to act on (e.g. which LED), if relevant, - arg2 -> state: state to set (e.g. LED on or off), if relevant. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
acpi_evaluate_integer() takes a pathname parameter which contains the name of the entity to evaluate underneath the given handle, so calling acpi_get_handle() beforehand is redundant. Replace the call to acpi_get_handle() with a call to acpi_evaluate_integer(), thus eliminating the need for a local variable storing the handle. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Set values of FUNC call parameters in a designated initializer. Do not initialize status and handle variables as the values these are initialized to have no influence on execution flow. Use an array variable instead of the address of the first element of that array. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Remove the keycode[1-5] fields from struct fujitsu_bl as they are not needed any more as a result of the sparse keymap migration. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Some laptop models need to have different keycodes assigned to hotkey scancodes. Change the sparse keymap upon a DMI match, before the hotkey input device is setup. Instead of using three different callbacks in the DMI match table, simplify code by using the driver_data field of struct dmi_system_id to supply the requested keymap to a common callback. Also merge keymaps for S6410 and S6420 as they are identical. Rename fujitsu_dmi_table to fujitsu_laptop_dmi_table to emphasize it is no longer used by the backlight part of fujitsu-laptop. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify hotkey event generation by using a sparse keymap. As sparse keymap operates on scancodes instead of keycodes, adjust variable names and debug messages accordingly. This patch only handles the default keymap for clarity. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> [dvhart: correct flag passed to call_fext_func in acpi_fujitsu_laptop_notify] Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use a managed input device for hotkey events in order to simplify two error paths and one cleanup function while also reducing the number of local variables required. Remove double assignment to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify error handling in acpi_fujitsu_laptop_add() by moving code responsible for setting up the input device to a separate function. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify brightness key event generation by using a sparse keymap. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use a managed input device for brightness events in order to simplify two error paths and one cleanup function while also reducing the number of local variables required. Remove double assignment to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify error handling in acpi_fujitsu_bl_add() by moving code responsible for setting up the input device to a separate function. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Darren Hart 提交于
Merge branch 'dell-laptop-changes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git to avoid linux-next merge conflict with dell-laptop.c. Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Add an entry providing the necessary info to make the touchscreen work on various tablets based on the Insyde 7W whitebox tablet. This has been tested on a DEXP Ursus 7W tablet. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Now that device_add_properties takes a const property_entry * rather then a non-const one we can constify the properties arrays. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Make dell-wmi notify on hotkey kbd brightness changes, listen for this in dell-laptop and call led_classdev_notify_brightness_hw_changed. This will allow userspace to monitor (poll) for brightness changes on these LEDs caused by the hotkey. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
The kbd led code has multiple entry points each of which modifies the kbd_state by reading it, modifying a copy, writing the copy and on error setting the modified copy writing back the original state. This is racy, so add a mutex protection the read-modify-write cycle on each of the entry points. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Return -EINVAL immediately on invalid input, rather then doing the straight path in an if block and returning -EINVAL at the end of the function. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
There are several cases where events handled in one of the dell-* drivers need to be propagated to another dell-* driver. This commit adds 3 generic functions: dell_laptop_register_notifier() dell_laptop_unregister_notifier() dell_laptop_call_notifier() It currently only defines 1 action: DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED Which is intended to propagate kbd_backlight_brightness_changed wmi events from dell-wmi to dell-laptop (which contains the actual kbd backlight driver). These functions are put in dell-smbios as both dell-wmi and dell-laptop use smbios functions and I do not want to put the notifier head in either driver, as that will make the 2 drivers depend on each other. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
- 24 3月, 2017 6 次提交
-
-
由 Michał Kępień 提交于
Both struct fujitsu_bl and struct fujitsu_laptop have a pf_device field. Up until now the latter has been redundant, which is logically incorrect because the primary function of the platform device created by fujitsu-laptop is to provide laptop-related (not brightness-related) attributes to userspace. Remove the pf_device field from struct fujitsu_bl and make all module code use the pf_device field of struct fujitsu_laptop instead. Suggested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
The platform device registered by fujitsu-laptop is registered unconditionally while sysfs attributes attached to it depend on the FUJ02E3 ACPI device being present. Fix this by moving platform device creation and removal to acpi_fujitsu_laptop_add() and acpi_fujitsu_laptop_remove(), respectively. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Platform device handling adds a lot of complexity to fujitsu_init(), which hinders its readability. Extract code responsible for adding and removing the platform device to separate functions. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use the DEVICE_ATTR_RO() macro to get rid of ignore_store() and shorten attribute definitions. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Setting backlight level using a vendor-specific interface should only be possible when using the latter is either explicitly requested by the user or automatically selected by the kernel. fujitsu-laptop violates that premise by unconditionally attaching three backlight-related attributes to the platform device it registers. Remove the offending attributes from the platform device. Update module comments to reflect this change. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Pau Espin Pedrol 提交于
Otherwise those are printed several times when (un)plugging the AC connector. Signed-off-by: NPau Espin Pedrol <pespin.shar@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
- 15 3月, 2017 10 次提交
-
-
由 Michał Kępień 提交于
devm_input_allocate_device() already causes the supplied struct device to be set as the parent of the input device, so doing it again is redundant. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NAlex Hung <alex.hung@canonical.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces acpi_pcc_destroy_input() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces msi_laptop_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-