aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-04-29HID: fix possible deadlock in usbhid_close()Oliver Neukum1-1/+1
This patch switches usbhid_close() from flush_scheduled_work() to canceling the outstanding work. This fixes a possible deadlock due to work taking the mutex usbhid_close() holds. Lockdep reported the problem. Signed-off-by: Oliver Neukum <oliver@neukum.org> -- Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-29HID: Fix the support for apple mini aluminium keyboardUlrich Dangel1-1/+1
Quirks for the apple mini keyboard was recently added but keyboard was recognized as a powerbook keyboard. Adjusted boundary to the lowest product id for the apple mini keyboard to get the right translation. Signed-off-by: Ulrich Dangel <uli@spamt.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-17HID: Add support for the G25 force feedback wheel in native modeChristophe Borivant3-0/+4
Add Product Id 0xc299 for the Logitech G25 force feedback wheel The Logitech G25 force feedback wheel, is first recognize by the kernel with the product id "0xc294". In this mode, we can't use all the axes and buttons of the wheel. Using a userland utility, it is possible to make the wheel switch to native mode -- http://svn.vdrift.net/viewvc.cgi/trunk/tools/G25manage/?root=VDrift In native mode, the wheel change its id number to "0xc299". The packet that needs to be sent to the wheel to swtich to native mode and change its PID is { 0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 } Signed-off-by: Christophe Borivant <christophe.borivant@wanadoo.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-07HID: hidraw -- fix missing unlocks in unlocked_ioctlDan Carpenter1-4/+8
There were 2 places that returned directly instead of releasing their locks. I sent a fix for this file earlier but ended up missing these spots. I think what happened is that I have improved my checker script since then... Or maybe I just screwed up. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-05Audit: remove spaces from audit_log_d_pathEric Paris2-3/+3
audit_log_d_path had spaces in the strings which would be emitted on the error paths. This patch simply replaces those spaces with an _ or removes the needless spaces entirely. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05audit: audit_set_auditable defined but not usedEric Paris1-8/+8
after 0590b9335a1c72a3f0defcc6231287f7817e07c8 audit_set_auditable() is now only used by the audit tree code. If CONFIG_AUDIT_TREE is unset it will be defined but unused. This patch simply moves the function inside a CONFIG_AUDIT_TREE block. cc1: warnings being treated as errors /home/acme_unencrypted/git/linux-2.6-tip/kernel/auditsc.c:745: error: ‘audit_set_auditable’ defined but not used make[2]: *** [kernel/auditsc.o] Error 1 make[1]: *** [kernel] Error 2 make[1]: *** Waiting for unfinished jobs.... Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05audit: incorrect ref counting in audit tree tag_chunkEric Paris1-0/+2
tag_chunk has bad exit paths in which the inotify ref counting is wrong. At the top of the function we found &old_watch using inotify_find_watch(). inotify_find_watch takes a reference to the watch. This is never dropped on an error path. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05audit: Fix possible return value truncation in audit_get_context()Paul Moore1-1/+1
The audit subsystem treats syscall return codes as type long, unfortunately the audit_get_context() function mistakenly converts the return code to an int type in the parameters which could cause problems on systems where the sizeof(int) != sizeof(long). Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05audit: ignore terminating NUL in AUDIT_USER_TTY messagesMiloslav Trmac1-0/+3
AUDIT_USER_TTY, like all other messages sent from user-space, is sent NUL-terminated. Unlike other user-space audit messages, which come only from trusted sources, AUDIT_USER_TTY messages are processed using audit_log_n_untrustedstring(). This patch modifies AUDIT_USER_TTY handling to ignore the trailing NUL and use the "quoted_string" representation of the message if possible. Signed-off-by: Miloslav Trmac <mitr@redhat.com> Cc: Eric Paris <eparis@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05Audit: fix handling of 'strings' with NULL charactersMiloslav Trmac1-1/+1
currently audit_log_n_untrustedstring() uses audit_string_contains_control() to check if the 'string' has any control characters. If the 'string' has an embedded NULL audit_string_contains_control() will return that the data has no control characters and will then pass the string to audit_log_n_string with the total length, not the length up to the first NULL. audit_log_n_string() does a memcpy of the entire length and so the actual audit record emitted may then contain a NULL and then whatever random memory is after the NULL. Since we want to log the entire octet stream (if we can't trust the data to be a string we can't trust that a NULL isn't actually a part of it) we should just consider NULL as a control character. If the caller is certain they want to stop at the first NULL they should be using audit_log_untrustedstring. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05make the e->rule.xxx shorter in kernel auditfilter.cZhenwen Xu1-8/+8
make the e->rule.xxx shorter in kernel/auditfilter.c -- --------------------------------- Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn >From 99692dc640b278f1cb1a15646ce42f22e89c0f77 Mon Sep 17 00:00:00 2001 From: Zhenwen Xu <Helight.Xu@gmail.com> Date: Thu, 12 Mar 2009 22:04:59 +0800 Subject: [PATCH] make the e->rule.xxx shorter in kernel/auditfilter.c Signed-off-by: Zhenwen Xu <Helight.Xu@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05auditsc: fix kernel-doc notationRandy Dunlap1-2/+2
Fix auditsc kernel-doc notation: Warning(linux-2.6.28-git7//kernel/auditsc.c:2156): No description found for parameter 'attr' Warning(linux-2.6.28-git7//kernel/auditsc.c:2156): Excess function parameter 'u_attr' description in '__audit_mq_open' Warning(linux-2.6.28-git7//kernel/auditsc.c:2204): No description found for parameter 'notification' Warning(linux-2.6.28-git7//kernel/auditsc.c:2204): Excess function parameter 'u_notification' description in '__audit_mq_notify' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> cc: Al Viro <viro@zeniv.linux.org.uk> cc: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05audit: EXECVE record - removed bogus newlineJiri Pirko1-5/+4
(updated) Added hunk that changes the comment, the rest is the same. EXECVE records contain a newline after every argument. auditd converts "\n" to " " so you cannot see newlines even in raw logs, but they're there nevertheless. If you're not using auditd, you need to work round them. These '\n' chars are can be easily replaced by spaces when creating record in kernel. Note there is no need for trailing '\n' in an audit record. record before this patch: "type=EXECVE msg=audit(1231421801.566:31): argc=4 a0=\"./test\"\na1=\"a\"\na2=\"b\"\na3=\"c\"\n" record after this patch: "type=EXECVE msg=audit(1231421801.566:31): argc=4 a0=\"./test\" a1=\"a\" a2=\"b\" a3=\"c\"" Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-04-05ACPI: processor: use .notify method instead of installing handler directlyBjorn Helgaas1-15/+4
This patch adds a .notify() method. The presence of .notify() causes Linux/ACPI to manage event handlers and notify handlers on our behalf, so we don't have to install and remove them ourselves. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Zhang Rui <rui.zhang@intel.com> CC: Zhao Yakui <yakui.zhao@intel.com> CC: Venki Pallipadi <venkatesh.pallipadi@intel.com> CC: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05ACPI: button: use .notify method instead of installing handler directlyBjorn Helgaas1-69/+8
This patch adds a .notify() method. The presence of .notify() causes Linux/ACPI to manage event handlers and notify handlers on our behalf, so we don't have to install and remove them ourselves. Note that events from fixed hardware buttons now show up as a special notify event, so to preserve user-space backward compatibility, we convert that back to ACPI_BUTTON_NOTIFY_STATUS. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05ACPI: support acpi_device_ops .notify methodsBjorn Helgaas3-0/+83
This patch adds support for ACPI device driver .notify() methods. If such a method is present, Linux/ACPI installs a handler for device notifications (but not for system notifications such as Bus Check, Device Check, etc). When a device notification occurs, Linux/ACPI passes it on to the driver's .notify() method. In most cases, this removes the need for drivers to install their own handlers for device-specific notifications. For fixed hardware devices like some power and sleep buttons, there's no notification value because there's no control method to execute a Notify opcode. When a fixed hardware device generates an event, we handle it the same as a regular device notification, except we send a ACPI_FIXED_HARDWARE_EVENT value. This is outside the normal 0x0-0xff range used by Notify opcodes. Several drivers install their own handlers for system Bus Check and Device Check notifications so they can support hot-plug. This patch doesn't affect that usage. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05toshiba-acpi: remove MAINTAINERS entryJohannes Berg1-4/+1
"I'm not much opposed to marking this driver orphaned. I haven't used a Toshiba laptop in four years or so, and disagree with the recent additions of bluetooth and wireless control to the driver. --John" Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: John Belmonte <john@neggie.net> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05mfd: fix da903x warningSamuel Ortiz1-1/+1
The da903x interrupt handler is retruning an int instead of an irqreturn_t. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-04-05mfd: fix MAINTAINERS entrySamuel Ortiz1-1/+2
The MFD git repo is living on kernel.org, and patches should be sent at sameo@linux.intel.com. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-04-05mfd: Use the value of the final spin when reading the AUXADCMark Brown1-1/+1
Reverse the order of the tests for loop exit so we use a valid value before we time out. Vanishingly unlikely to happen since we retry for several times the expected conversion time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: Storage class should be before const qualifierTobias Klauser3-4/+4
The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: PASIC3: supply clock_rate to DS1WM via driver_dataPhilipp Zabel1-9/+13
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: remove DS1WM clock handlingPhilipp Zabel2-20/+8
This driver requests a clock that usually is supplied by the MFD in which the DS1WM is contained. Currently, it is impossible for a MFD to register their clocks with the generic clock API due to different implementations across architectures. For now, this patch removes the clock handling from DS1WM altogether, trusting that the MFD enable/disable functions will switch the clock if needed. The clock rate is obtained from a new parameter in driver_data. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: remove unused PASIC3 bus_shift fieldPhilipp Zabel1-1/+0
Removes the now-unused bus_shift field from pasic3_platform_data. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05pxa/magician: remove deprecated .bus_shift from PASIC3 platform_dataPhilipp Zabel1-1/+0
The PASIC3 driver now calculates its register spacing from the resource size. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: convert PASIC3 to use MFD corePhilipp Zabel2-98/+62
This patch makes htc-pasic3 register the DS1WM and LED cell drivers through the MFD core infrastructure instead of allocating the platform devices manually. It also calculates the bus_shift parameter from the memory resource size. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: convert DS1WM to use MFD corePhilipp Zabel3-23/+25
This patch converts the DS1WM driver into an MFD cell. It also calculates the bus_shift parameter from the memory resource size. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: Support active high IRQs on WM835xMark Brown2-1/+17
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: Use bulk read to fill WM8350 register cacheMark Brown1-9/+12
Some I2C controllers have high overheads for setting up I2C operations which makes the register cache setup on startup excessively slow since it does a lot of small transactions. Reduce this overhead by doing a bulk read of the entire register bank and filtering out what we don't need later. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: remove duplicated #include from pcf50633Huang Weiyi1-1/+0
Removed duplicated #include <linux/device.h> in drivers/mfd/pcf50633-core.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-04Make non-compat preadv/pwritev use native register sizeLinus Torvalds4-10/+16
Instead of always splitting the file offset into 32-bit 'high' and 'low' parts, just split them into the largest natural word-size - which in C terms is 'unsigned long'. This allows 64-bit architectures to avoid the unnecessary 32-bit shifting and masking for native format (while the compat interfaces will obviously always have to do it). This also changes the order of 'high' and 'low' to be "low first". Why? Because when we have it like this, the 64-bit system calls now don't use the "pos_high" argument at all, and it makes more sense for the native system call to simply match the user-mode prototype. This results in a much more natural calling convention, and allows the compiler to generate much more straightforward code. On x86-64, we now generate testq %rcx, %rcx # pos_l js .L122 #, movq %rcx, -48(%rbp) # pos_l, pos from the C source loff_t pos = pos_from_hilo(pos_h, pos_l); ... if (pos < 0) return -EINVAL; and the 'pos_h' register isn't even touched. It used to generate code like mov %r8d, %r8d # pos_low, pos_low salq $32, %rcx #, tmp71 movq %r8, %rax # pos_low, pos.386 orq %rcx, %rax # tmp71, pos.386 js .L122 #, movq %rax, -48(%rbp) # pos.386, pos which isn't _that_ horrible, but it does show how the natural word size is just a more sensible interface (same arguments will hold in the user level glibc wrapper function, of course, so the kernel side is just half of the equation!) Note: in all cases the user code wrapper can again be the same. You can just do #define HALF_BITS (sizeof(unsigned long)*4) __syscall(PWRITEV, fd, iov, count, offset, (offset >> HALF_BITS) >> HALF_BITS); or something like that. That way the user mode wrapper will also be nicely passing in a zero (it won't actually have to do the shifts, the compiler will understand what is going on) for the last argument. And that is a good idea, even if nobody will necessarily ever care: if we ever do move to a 128-bit lloff_t, this particular system call might be left alone. Of course, that will be the least of our worries if we really ever need to care, so this may not be worth really caring about. [ Fixed for lost 'loff_t' cast noticed by Andrew Morton ] Acked-by: Gerd Hoffmann <kraxel@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Ralf Baechle <ralf@linux-mips.org>> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-04ACPI: battery: asynchronous initArjan van de Ven2-5/+12
The battery driver tends to take quite some time to initialize (100ms-300ms is quite typical). This patch initializes the batter driver asynchronously, so that other things in the kernel can initialize in parallel to this 300 msec. As part of this, the battery driver had to move to the back of the ACPI init order (hence the Makefile change). Without this move, the next ACPI driver would just block on the ACPI/devicee layer semaphores until the battery driver was done anyway, not gaining any boot time. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04acer-wmi: Update copyright notice & documentationCarlos Corbacho2-4/+8
Explicitly note in the documentation that the Acer Aspire One is not supported. Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04acer-wmi: Cleanup the failure cleanup handlingAndy Whitcroft1-1/+7
Cleanup the failure cleanup handling for brightness and email led. [cc: Split out from another patch] Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04acer-wmi: Blacklist Acer Aspire OneCarlos Corbacho1-0/+25
The Aspire One's ACPI-WMI interface is a placeholder that does nothing, and the invalid results that we get from it are now causing userspace problems as acer-wmi always returns that the rfkill is enabled (i.e. the radio is off, when it isn't). As it's hardware controlled, acer-wmi isn't needed on the Aspire One either. Thanks to Andy Whitcroft at Canonical for tracking down Ubuntu's userspace issues to this. Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Reported-by: Andy Whitcroft <apw@canonical.com> Cc: stable@kernel.org Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04sh: sh7785lcr: Map whole PCI address space.Takashi Yoshii2-17/+8
PCI still doesn't work on sh7785lcr 29bit 256M map mode. On SH7785, PCI -> SHwy address translation is not base+offset but somewhat like base|offset (See HW Manual (rej09b0261) Fig. 13.11). So, you can't export CS2,3,4,5 by 256M at CS2 (results CS0,1,2,3 exported, I guess). There are two candidates. a) 128M@CS2 + 128M@CS4 b) 512M@CS0 Attached patch is B. It maps 512M Byte at 0 independently of memory size. It results CS0 to CS6 and perhaps some more being accessible from PCI. Tested on 7785lcr 29bit 128M map 7785lcr 29bit 256M map (NOT tested on 32bit) Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-04sh: Fix up DSP context save/restore.Michael Trimarchi7-137/+161
There were a number of issues with the DSP context save/restore code, mostly left-over relics from when it was introduced on SH3-DSP with little follow-up testing, resulting in things like task_pt_dspregs() referencing incorrect state on the stack. This follows the MIPS convention of tracking the DSP state in the thread_struct and handling the state save/restore in switch_to() and finish_arch_switch() respectively. The regset interface is also updated, which allows us to finally be rid of task_pt_dspregs() and the special cased task_pt_regs(). Signed-off-by: Michael Trimarchi <michael@evidence.eu.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-04sh: Fix up number of on-chip DMA channels on SH7091.Paul Mundt1-8/+12
This accidentally regressed when the multi-IRQ changes went in, switching SH7091 from 4 to 6 channels. Add SH7091 back in to the 4-channel dependency list. Reported-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-04video: build fixLen Brown1-4/+4
acpi_video_device_write_state() and friends now return ssize_t, while the constify patch assumed it was still int. Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: rework brightness supportHenrique de Moraes Holschuh2-102/+227
Refactor and redesign the brightness control backend... In order to fix bugzilla #11750... Add a new brightness control mode: support direct NVRAM checkpointing of the backlight level (i.e. store directly to NVRAM without the need for UCMS calls), and use that together with the EC-based control. Disallow UCMS+EC, thus avoiding races with the SMM firmware. Switch the models that define HBRV (EC Brightness Value) in the DSDT to the new mode. These are: T40-T43, R50-R52, R50e, R51e, X31-X41. Change the default for all other IBM ThinkPads to UCMS-only. The Lenovo models already default to UCMS-only. Reported-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: enhanced debugging messages for the fan subdriverHenrique de Moraes Holschuh2-5/+42
Enhance debugging messages for the fan subdriver. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: enhanced debugging messages for the hotkey subdriverHenrique de Moraes Holschuh2-10/+30
Enhance debugging messages for the hotkey subdriver. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: enhanced debugging messages for rfkill subdriversHenrique de Moraes Holschuh2-21/+98
Enhance debugging messages for all rfkill subdrivers in thinkpad-acpi. Also, log a warning if the deprecated sysfs attributes are in use. These attributes are going to be removed sometime in 2010. There is an user-visible side-effect: we now coalesce attempts to enable/disable bluetooth or WWAN in the procfs interface, instead of hammering the firmware with multiple requests. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: restrict access to some firmware LEDsHenrique de Moraes Holschuh3-20/+91
Some of the ThinkPad LEDs indicate critical conditions that can cause data loss or cause hardware damage when ignored (e.g. force-ejecting a powered up bay; ignoring a failing battery, or empty battery; force- undocking with the dock buses still active, etc). On almost all ThinkPads, LED access is write-only, and the firmware usually does fire-and-forget signaling on them, so you effectively lose whatever message the firmware was trying to convey to the user when you override the LED state, without any chance to restore it. Restrict access to all LEDs that can convey important alarms, or that could mislead the user into incorrectly operating the hardware. This will make the Lenovo engineers less unhappy about the whole issue. Allow users that really want it to still control all LEDs, it is the unaware user that we have to worry about. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: remove HKEY disable functionalityHenrique de Moraes Holschuh2-42/+46
The HKEY disable functionality basically cripples the entire event model of the ThinkPad firmware and of the thinkpad-acpi driver. Remove this functionality from the driver. HKEY must be enabled at all times while thinkpad-acpi is loaded, and disabled otherwise. For sysfs, according to the sysfs ABI and the thinkpad-acpi sysfs rules of engagement, we will just remove the attributes. This will be done in two stages: disable their function now, after two kernel releases, remove the attributes. For procfs, we call WARN(). If nothing triggers it, I will simply remove the enable/disable commands entirely in the future along with the sysfs attributes. I don't expect much, if any fallout from this. There really isn't any reason to mess with hotkey_enable or with the enable/disable commands to /proc/acpi/ibm/hotkey, and this has been true for years... Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: add new debug helpers and warn of deprecated attsHenrique de Moraes Holschuh2-0/+42
Add a debug helper that discloses the TGID of the userspace task attempting to access the driver. This is highly useful when dealing with bug reports, since often the user has no idea that some userspace application is accessing thinkpad-acpi... Also add a helper to log warnings about sysfs attributes that are deprecated. Use the new helpers to issue deprecation warnings for bluetooth_enable and wwan_enabled, that have been deprecated for a while, now. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: add missing log levelsHenrique de Moraes Holschuh1-8/+11
Add missing log levels in a standalone commit, to avoid dependencies in future unrelated changes, just because they wanted to use one of the missing log levels. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: cleanup debug helpersHenrique de Moraes Holschuh1-11/+18
Fix the vdbg_printk macro definition to be sane when CONFIG_THINKPAD_ACPI_DEBUG is undefined, and move the mess into a file section of its own. This doesn't change anything in the current code, but future code will need the proper behaviour. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: documentation cleanupHenrique de Moraes Holschuh1-24/+52
Some cleanups to the documentation of the driver. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04thinkpad-acpi: drop ibm-acpi aliasHenrique de Moraes Holschuh1-3/+0
The driver was renamed two years ago, on 2.6.21. Drop the old compatibility alias, we have given everybody quite enough time to update their configs to the new name. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>