- 20 11月, 2014 5 次提交
-
-
由 Frans Klaver 提交于
eeepc_[gs]et_fan_ctrl uses some magic numbers. These numbers mean something more than just the number. Describe them with macros instead of comments in one of the functions. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
The rfkill notifier node names are used in three different places. As a matter of style, it is better to store them somewhere and have the compiler warn us about typos in the function arguments. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
As per Documentation/CodingStyle ch. 2, it is preferred that we don't break user visible strings, in order to allow users to grep for them. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
In eeepc_rfkill_hotplug there's an if statement with a big tail that ends right before the out_unlock label. We might as well invert the condition and jump to out_unlock in that case, pretty much like the rest of the code does. This removes an indentation level for a large chunk of code and also stops suggesting there might be an else clause. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Giedrius Statkevičius 提交于
Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/misc/ideapad_slidebar.c. Signed-off-by: NGiedrius Statkevičius <giedriuswork@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 11 11月, 2014 1 次提交
-
-
由 Giedrius Statkevicius 提交于
Make hp_accel dependent on SERIO_I8042 in the Kconfig because since commit a4c724d0 ('platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream') hp_accel includes i8042.h and serio.h. Reported-by: NJim Davis <jim.epost@gmail.com> Signed-off-by: NGiedrius Statkevičius <giedriuswork@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 08 11月, 2014 1 次提交
-
-
由 Giedrius Statkevicius 提交于
Add a i8042 filter to hp_accel to remove accelerometer's data with acpi id HPQ6000 from keyboard bus stream. The codes sent by accelerometer are e0 25, e0 26, e0 27 and e0 28. The relevant information is already passed through /dev/freefall so no need to send these undocumented weird signals through the keyboard bus. Also, unclogs `dmesg` because atkbd complained about weird scan codes, saves processing power and disk space. Signed-off-by: NGiedrius Statkevičius <giedriuswork@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NÉric Piel <eric.piel@tremplin-utc.net> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 28 10月, 2014 5 次提交
-
-
由 Stephan Mueller 提交于
The Yoga 3 does not contain any physical rfkill switch. Therefore disable the rfkill switch identically to the Yoga 2 approach. Signed-off-by: NStephan Mueller <smueller@chronox.de> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Hans de Goede 提交于
The acpi-video backlight interface on the Acer KAV80 is broken, and worse it causes the entire machine to slow down significantly after a suspend/resume. Blacklist it, and use the acer-wmi backlight interface instead. Note that the KAV80 is somewhat unique in that it is the only Acer model where we fall back to acer-wmi after blacklisting, rather then using the native (e.g. intel) backlight driver. This is done because there is no native backlight interface on this model. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1128309 Cc: stable@vger.kernel.org Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Hans de Goede 提交于
The acpi-video backlight interface on the NC210 does not work, blacklist it and use the samsung-laptop interface instead. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=861573 Cc: stable@vger.kernel.org Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Stanislaw Gruszka 提交于
X550VB as many others Asus laptops need wapf4 quirk to make RFKILL switch be functional. Otherwise system boots with wireless card disabled and is only possible to enable it by suspend/resume. Bug report: http://bugzilla.redhat.com/show_bug.cgi?id=1089731#c23Reported-and-tested-by: NVratislav Podzimek <vpodzime@redhat.com> Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Aaron Lu 提交于
As bug #72551, the Toshiba TECRA A50-A series models also come with the new keymap layout as found out by Azael Avalos, so add it to the dmi table. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=76971Reported-and-tested-by: NBlindekinder <rafael.raccuia@blindekinder.com> Cc: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 14 10月, 2014 1 次提交
-
-
由 Rasmus Villemoes 提交于
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 07 10月, 2014 1 次提交
-
-
由 Azael Avalos 提交于
With the introduction of the new keyboard backlight implementation, the *_timeout_store function is broken, as it only supports the first kbd_type. This patch adapts such function for the new kbd_type, as well as converts from using sscanf to kstrtoint. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 01 10月, 2014 3 次提交
-
-
由 Azael Avalos 提交于
Currently the HCI/SCI read/write functions are returning the status of the ACPI call and also assigning the returned value of the HCI/SCI function, however, only the HCI/SCI status is being checked. This patch changes such functions, returning the value of the HCI/SCI function instead of the ACPI call status, eliminating one parameter, and returning something useful that indeed is being checked. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Azael Avalos 提交于
The return codes are split in between HCI/SCI prefixes, but they are shared (used) by both interfaces, mixing hci_read/write calls with SCI_* return codes, and sci_read/write calls with HCI_* ones. This patch changes the prefix of the return codes definitions, dropping the HCI/SCI naming and instead replacing it with TOS (for TOShiba). Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Azael Avalos 提交于
The function name hci_raw was used before to reflect a raw (read/write) call to Toshiba's Hardware Configuration Interface (HCI), however, since the introduction of the System Configuration Interface (SCI), that "name" no longer applies. This patch changes the name of that function to tci_raw (for Toshiba Configuration Interface), and change the comments about it. Also, the HCI_WORDS definition was changed to TCI_RAW, to better reflect that we're no longer using pure HCI calls, but a combination of HCI and SCI, which form part of the Toshiba Configuration Interface. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 30 9月, 2014 1 次提交
-
-
由 Pali Rohár 提交于
Without this patch, dell-wmi is trying to access elements of dynamically allocated array without checking the array size. This can lead to memory corruption or a kernel panic. This patch adds the missing checks for array size. Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 26 9月, 2014 1 次提交
-
-
由 Masanari Iida 提交于
This patch fix spelling typos found in Kconfig. Signed-off-by: NMasanari Iida <standby24x7@gmail.com> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 23 9月, 2014 1 次提交
-
-
由 Frans Klaver 提交于
Handle errors immediately in eeepc_register_rfkill_notifier and eeepc_unregister_rfkill_notifier. This clears up the control flow for the reader. It also removes unnecessary indentation. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 20 9月, 2014 9 次提交
-
-
由 Frans Klaver 提交于
The result of set_acpi is left unchecked, but it may return errors. If one occurs, send the error to the caller. There's no reason to lie about it, if set_acpi fails. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
In get_cpufv the return value of get_acpi is stored in the cpufv struct. Right before this value is checked for errors, it is and'ed with 0xff. This means c->cur can never be less than zero. Besides that, the actual error value is ignored. c->num is also and'ed with 0xff, which means we can ignore values below zero. Check the result of get_acpi() right away. While at it, propagate the error if we got one. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
In the instantiation of the fan1_input device attribute, NULL is passed as set function to store_sys_hwmon. The function pointer is never checked before dereferencing it. This is fine if we can guarantee that it will never be called with an invalid pointer, but we can't. If someone from user space decides to change the permissions on this attribute and write to it, kernel will crash. Introduce EEEPC_CREATE_SENSOR_ATTR_RO() to instantiate a read-only attribute, and declare fan1_input with it. This ensures store_sys_hwmon is never called with NULL parameters. If someone tries to write the attribute, the system will at least keep its sanity. This also causes EEEPC_CREATE_SENSOR_ATTR() to be only used for R/W attributes.This enables us to drop the _mode argument from the macro and use DEVICE_ATTR_RW() internally while we're at it. Append _RW to the name for readability. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
Pull out EEEPC_SENSOR_STORE_FUNC and EEEPC_SENSOR_SHOW_FUNC. These macros define functions that call store_sys_hwmon() and show_sys_hwmon() respectively. This helps prevent duplication later on. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
The disp attribute is write-only, but sysfs doesn't know this. Currently show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi call should fail. This was introduced in 6dff29b6 "eeepc-laptop: disp attribute should be write-only". This is not ideal; behaving like sysfs is better left to sysfs. Introduce EEEPC_CREATE_DEVICE_ATTR_WO() to instantiate a write-only attribute, and declare the disp attribute with it. Sysfs makes sure userspace can only write to disp at all times. This removes the need for mimicking the sysfs behavior in show_sys_acpi() and store_sys_acpi(), but we'll stick with -EIO, as changing sysfs return values should not be taken lightly. This change also causes EEEPC_CREATE_DEVICE_ATTR() to be used only for R/W attributes. This enables us to drop the _mode argument from the macro and use DEVICE_ATTR_RW() internally while we're at it. Append _RW to the name for readability. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
Pull out macros EEEPC_ACPI_STORE_FUNC and EEEPC_ACPI_SHOW_FUNC. These macros define functions that call store_sys_acpi() and show_sys_acpi() respectively. This helps prevent duplication later on. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
Device attributes are instantiated manually, while we have DEVICE_ATTR* macros available to do much of the work for us. Let's use them. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
The eeepc-laptop driver follows the function naming convention <action>_<attrname>(), while the sysfs macros are built around the convention <attrname>_<action>(). Rename the sysfs functions to the convention used by sysfs. This makes it easier to use the available API later on. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Frans Klaver 提交于
Correct indentation and brace usage to comply with Documentation/CodingStyle. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 19 9月, 2014 2 次提交
-
-
由 abdoulaye berthe 提交于
this remove all reference to gpio_remove retval in all driver except pinctrl and gpio. the same thing is done for gpio and pinctrl in two different patches. Signed-off-by: NAbdoulaye Berthe <berthe.ab@gmail.com> Acked-by: NMichael Büsch <m@bues.ch> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NMauro Carvalho Chehab <m.chehab@samsung.com> Acked-by: NTomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Paul Bolle 提交于
parse_arg() has three possible return values: -EINVAL if sscanf(), in short, fails; zero if "count" is zero; and "count" in all other cases But "count" will never be zero. See, parse_arg() is called by the various store functions. And the callchain of these functions starts with sysfs_kf_write(). And that function checks for a zero "count". So we can stop checking for a zero "count", drop the "count" argument entirely, and transform parse_arg() into a function that returns zero on success or a negative error. That, in turn, allows to make those store functions just return "count" on success. The net effect is that the code becomes a bit easier to understand. A nice side effect is that this GCC warning is silenced too: drivers/platform/x86/eeepc-laptop.c: In function ‘store_sys_acpi’: drivers/platform/x86/eeepc-laptop.c:279:10: warning: ‘value’ may be used uninitialized in this function [-Wmaybe-uninitialized] int rv, value; Which is, of course, the reason to have a look at parse_arg(). Signed-off-by: NPaul Bolle <pebolle@tiscali.nl> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 18 9月, 2014 7 次提交
-
-
由 Peter Ujfalusi 提交于
There is no need to initialize the error since it is going to be assigned with the return status of at least on of the device_create_file() call. We can return directly in case the first file creation fails. All the labels for goto can be removed (along with the gotos) as well. Tell the compiler that the failures are unlikely so it can create better binaries. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Peter Ujfalusi 提交于
ACPI_SUCCESS is defined as: #define ACPI_SUCCESS(a) (!(a)) There is no need for the the double ! since there is already a macro defined for failures: ACPI_FAILURE() Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Jan van den Berg 提交于
Fixed 22 similar coding style issues: "ERROR: spaces required around that '?'" Signed-off-by: NJan van den Berg <janvdberg@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Azael Avalos 提交于
Newer Toshiba models now come with a new (and different) keyboard backlight implementation with three modes of operation: TIMER, ON and OFF, and the LED is now controlled internally by the firmware. This patch adds support for that type of backlight, changing the existing code to accomodate the new implementation. The timeout value range is now 1-60 seconds, and the accepted modes are now: 1 (FN-Z), 2 (AUTO or TIMER), 8 (ON) and 10 (OFF), this adds two new entries kbd_type and available_kbd_modes, the first shows the keyboard type and the latter shows the supported modes depending on the keyboard type. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Azael Avalos 提交于
The function toshiba_touchpad_store is not checking for invalid values and simply returns silently. This patch checks for invalid values and returns accordingly. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Azael Avalos 提交于
Some Toshiba models with illumination support set a different value on the returned codes, thus not allowing the illumination LED to be registered, where it should be. This patch removes a check from toshiba_illumination_available function to allow such models to register the illumination LED. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Azael Avalos 提交于
Appart from reporting hotkeys, the INFO method is used as a system wide event notifier for hardware or software changes. This patch adds additional "events" to the keymap list, ignored by now, until we find them a good use. Signed-off-by: NAzael Avalos <coproscefalo@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 09 9月, 2014 1 次提交
-
-
由 Zhang Rui 提交于
Fujitsu backlight and hotkey devices have ACPI drivers. The PNP MODULE_DEVICE_TABLE in fujitsu-laptop driver is just used as an indicator for module autoloading, but this is wrong because what we need is ACPI module device table instead, because the driver is probing ACPI devices. Thus remove those IDs from ACPI PNP scan handler list as we don't have a PNP driver for them, and convert the fujitsu-laptop PNP MODULE_DEVICE_TABLE to ACPI MODULE_DEVICE_TABLE. Link: https://bugzilla.kernel.org/show_bug.cgi?id=81971Signed-off-by: NZhang Rui <rui.zhang@intel.com> Tested-by: NDirk Griesbach <spamthis@freenet.de> Acked-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 04 9月, 2014 1 次提交
-
-
由 Dan Carpenter 提交于
The current code just returns -EINVAL because mode can't be equal to both 1 and 2. Also this function is messy so I have cleaned it up: 1) Remove initializers like "int time = -1". Initializing variables to garbage values turns off GCC's uninitialized variable warnings so it can lead to bugs. 2) Use kstrtoint() instead of sscanf(). 3) Use SCI_KBD_MODE_FNZ and SCI_KBD_MODE_AUTO instead of magic numbers 1 and 2. 4) Don't check for "mode == -1" because that can't happen. 5) Preserve the error code from toshiba_kbd_illum_status_set(). Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-