aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-06sh: intc: Fix build with IRQ balancing disabled.Paul Mundt1-4/+5
The balancing stubs obviously need to be static inline.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-06sh: intc: Add missing files.Paul Mundt2-0/+40
The Kconfig and Makefile were overlooked, add those in now to improve odds of building. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-05sh: intc: Split up the INTC code.Paul Mundt13-1808/+2051
This splits up the sh intc core in to something more vaguely resembling a subsystem. Most of the functionality was alread fairly well compartmentalized, and there were only a handful of interdependencies that needed to be resolved in the process. This also serves as future-proofing for the genirq and sparseirq rework, which will make some of the split out functionality wholly generic, allowing things to be killed off in place with minimal migration pain. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-05sh: intc: Handle early lookups of subgroup IRQs.Paul Mundt1-10/+24
If lookups happen while the radix node still points to a subgroup mapping, an IRQ hasn't yet been made available for the specified id, so error out accordingly. Once the slot is replaced with an IRQ mapping and the tag is discarded, lookup can commence as normal. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-05sh: intc: Support virtual mappings for IRQ subgroups.Paul Mundt1-66/+338
Many interrupts that share a single mask source but are on different hardware vectors will have an associated register tied to an INTEVT that denotes the precise cause for the interrupt exception being triggered. This introduces the concept of IRQ subgroups in the intc core, where a virtual IRQ map is constructed for each of the pre-defined cause bits, and a higher level chained handler takes control of the parent INTEVT. This enables CPUs with heavily muxed IRQ vectors (especially across disjoint blocks) to break things out in to a series of managed chained handlers while being able to dynamically lookup and adopt the IRQs created for them. This is largely an opt-in interface, requiring CPUs to manually submit IRQs for subgroup splitting, in addition to providing identifiers in their enum maps that can be used for lazy lookup via the radix tree. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-05sh: intc: Implement reverse mapping for IRQs to per-controller IDs.Paul Mundt2-1/+99
This implements a scheme roughly analogous to the PowerPC virtual to hardware IRQ mapping, which we use for IRQ to per-controller ID mapping. This makes it possible for drivers to use the IDs directly for lookup instead of hardcoding the vector. The main motivation for this work is as a building block for dynamically allocating virtual IRQs for demuxing INTC events sharing a single INTEVT in addition to a common masking source. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-04sh: pfc: Fix up BUG() triggered by gpiolib debugfs lookups.Paul Mundt1-4/+2
The gpiolib debugfs entry takes a hammer approach and iterates over all of the potential GPIOs, regardless of their type. The SH PFC code on the other hand contains a variable mismash of input/output/function types spread out sparsely, leading to situations where the debug code can trigger an out of range enum for the type. Since we already have an error path for out of range enums, we can just hand that up to the higher level instead of the current BUG() behaviour. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-04sh: pfc: support pinmux deregistration.Paul Mundt1-1/+10
Presently the pinmux code is a one-way thing, but there's nothing preventing an unregistration if no one has grabbed any of the pins. This will permit us to save a bit of memory on systems that require pin demux for certain peripherals in the case where registration of those peripherals fails, or they are otherwise not attached to the system. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-02sh: Support early IRQ vector map reservation for delayed controllers.Paul Mundt1-0/+11
Some controllers will need to be initialized lazily due to pinmux constraints, while others may simply have no need to be brought online if there are no backing devices for them attached. In this case it's still necessary to be able to reserve their hardware vector map before dynamic IRQs get a hold of them. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-02sh: Support IRQ balancing for SH-X3 proto cores, too.Paul Mundt1-1/+1
This adds in hardware IRQ auto-distribution support for SH-X3 proto CPUs, following the SH7786 support. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-16usb: Fix up r8a66597-hcd section mismatches.Paul Mundt1-2/+2
The _remove() routine is flagged __init_or_module, despite only being used in a __devexit context. As the rest of the driver is already balanced out with __devinit, switch to __devexit and __devexit_p() wrapping. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-16mfd: Fix up section mismatches in SH SDHI.Paul Mundt1-1/+1
The current probe/remove definitions are split between __init and __devexit, make them consistent by switching to __devinit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-20Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Paul Mundt38-211/+336
Conflicts: arch/sh/kernel/process_32.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-20sh: reinstate clock framework rate rounding.Paul Mundt1-1/+15
This was killed off by a simplification patch previously that failed to take the cpufreq use case in to account, so reinstate the old bounding logic. The lowest rate bounding on the other hand was broken in that it never actually got assigned a rate and the best fit rate was instead just getting lucky based on the ordering of the rate table, fix this up so the code actually does what it was intended to do originally. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-18Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hidLinus Torvalds5-6/+20
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: USB HID: Add ID for eGalax Multitouch used in JooJoo tablet HID: hiddev: fix memory corruption due to invalid intfdata HID: hiddev: protect against disconnect/NULL-dereference race HID: picolcd: correct ordering of framebuffer freeing HID: picolcd: testing the wrong variable
2010-08-18Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6Linus Torvalds3-35/+69
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: fs: brlock vfsmount_lock fs: scale files_lock lglock: introduce special lglock and brlock spin locks tty: fix fu_list abuse fs: cleanup files_lock locking fs: remove extra lookup in __lookup_hash fs: fs_struct rwlock to spinlock apparmor: use task path helpers fs: dentry allocation consolidation fs: fix do_lookup false negative mbcache: Limit the maximum number of cache entries hostfs ->follow_link() braino hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy remove SWRITE* I/O types kill BH_Ordered flag vfs: update ctime when changing the file's permission by setfacl cramfs: only unlock new inodes fix reiserfs_evict_inode end_writeback second call
2010-08-18mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=yUwe Kleine-König1-0/+2
This fixes a build breakage introduced by commit 4c2ef25fe0b8 ("mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume") Cc: David Brownell <david-b@pacbell.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: linux-mmc@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-18Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommuLinus Torvalds1-0/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: include sched.h in ColdFire/SPI driver m68knommu: formatting of pointers in printk() m68knommu: arch/m68k/include/asm/ide.h fix for nommu
2010-08-18Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds4-47/+48
* 'for-linus' of git://neil.brown.name/md: md raid-1/10 Fix bio_rw bit manipulations again md: provide appropriate return value for spare_active functions. md: Notify sysfs when RAID1/5/10 disk is In_sync. Update recovery_offset even when external metadata is used.
2010-08-18Merge branch 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds5-4/+6
* 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6: spi.h: missing kernel-doc notation, please fix of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers of: Fix missing includes ata: update for of_device to platform_device replacement microblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node microblaze: Fix of/address: Merge all of the bus translation code booting-without-of: Remove nonexistent chapters from TOC, fix numbering
2010-08-18tty: fix fu_list abuseNick Piggin2-35/+55
tty: fix fu_list abuse tty code abuses fu_list, which causes a bug in remount,ro handling. If a tty device node is opened on a filesystem, then the last link to the inode removed, the filesystem will be allowed to be remounted readonly. This is because fs_may_remount_ro does not find the 0 link tty inode on the file sb list (because the tty code incorrectly removed it to use for its own purpose). This can result in a filesystem with errors after it is marked "clean". Taking idea from Christoph's initial patch, allocate a tty private struct at file->private_data and put our required list fields in there, linking file and tty. This makes tty nodes behave the same way as other device nodes and avoid meddling with the vfs, and avoids this bug. The error handling is not trivial in the tty code, so for this bugfix, I take the simple approach of using __GFP_NOFAIL and don't worry about memory errors. This is not a problem because our allocator doesn't fail small allocs as a rule anyway. So proper error handling is left as an exercise for tty hackers. [ Arguably filesystem's device inode would ideally be divorced from the driver's pseudo inode when it is opened, but in practice it's not clear whether that will ever be worth implementing. ] Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig <hch@infradead.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Nick Piggin <npiggin@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-18fs: cleanup files_lock lockingNick Piggin2-9/+23
fs: cleanup files_lock locking Lock tty_files with a new spinlock, tty_files_lock; provide helpers to manipulate the per-sb files list; unexport the files_lock spinlock. Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig <hch@infradead.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Andi Kleen <ak@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Nick Piggin <npiggin@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-18fs: fs_struct rwlock to spinlockNick Piggin1-4/+4
fs: fs_struct rwlock to spinlock struct fs_struct.lock is an rwlock with the read-side used to protect root and pwd members while taking references to them. Taking a reference to a path typically requires just 2 atomic ops, so the critical section is very small. Parallel read-side operations would have cacheline contention on the lock, the dentry, and the vfsmount cachelines, so the rwlock is unlikely to ever give a real parallelism increase. Replace it with a spinlock to avoid one or two atomic operations in typical path lookup fastpath. Signed-off-by: Nick Piggin <npiggin@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-18md raid-1/10 Fix bio_rw bit manipulations againNeilBrown2-6/+6
commit 7b6d91daee5cac6402186ff224c3af39d79f4a0e changed the behaviour of a few variables in raid1 and raid10 from flags to bit-sets, but left them as type 'bool' so they did not work. Change them (back) to unsigned long. (historical note: see 1ef04fefe2241087d9db7e9615c3f11b516e36cf) Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: Jiri Slaby <jslaby@suse.cz> and many others
2010-08-18m68knommu: include sched.h in ColdFire/SPI driverGreg Ungerer1-0/+1
Using the coldfire qspi driver, I get the following error: drivers/spi/coldfire_qspi.c: In function 'mcfqspi_irq_handler': drivers/spi/coldfire_qspi.c:166: error: 'TASK_NORMAL' undeclared (first use in this function) drivers/spi/coldfire_qspi.c:166: error: (Each undeclared identifier is reported only once It is solved by adding the following include to coldfire_sqpi.c: #include <linux/sched.h> Fix suggested by Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2010-08-18md: provide appropriate return value for spare_active functions.NeilBrown3-15/+21
md_check_recovery expects ->spare_active to return 'true' if any spares were activated, but none of them do, so the consequent change in 'degraded' is not notified through sysfs. So count the number of spares activated, subtract it from 'degraded' just once, and return it. Reported-by: Adrian Drzewiecki <adriand@vmware.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-08-18md: Notify sysfs when RAID1/5/10 disk is In_sync.Adrian Drzewiecki3-0/+3
When RAID1 is done syncing disks, it'll update the state of synced rdevs to In_sync. But it neglected to notify sysfs that the attribute changed. So any programs that are waiting for an rdev's state to change will not be woken. (raid5/raid10 added by neilb) Signed-off-by: Adrian Drzewiecki <adriand@vmware.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-08-18Update recovery_offset even when external metadata is used.NeilBrown1-26/+18
The update of ->recovery_offset in sync_sbs is appropriate even then external metadata is in use. However sync_sbs is only called when native metadata is used. So move that update in to the top of md_update_sb (which is the only caller of sync_sbs) before the test on ->external. This moves the update out of ->write_lock protection, but those fields only need ->reconfig_mutex protection which they still have. Also move the test on ->persistent up to where ->external is set as for metadata update purposes they are the same. Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing if ->external is set or ->persistent isn't. Finally move the update of ->utime down as it is only relevent (like the ->events update) for native metadata. Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: "Kwolek, Adam" <adam.kwolek@intel.com>
2010-08-17Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdbLinus Torvalds1-4/+7
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb: vt,console,kdb: preserve console_blanked while in kdb vt: fix regression warnings from KMS merge arm,kgdb: fix GDB_MAX_REGS no longer used kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c kdb: fix compile error without CONFIG_KALLSYMS
2010-08-17Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86Linus Torvalds5-91/+117
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: platform/x86: move rfkill for Dell Mini 1012 to compal-laptop thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards thinkpad-acpi: add support for model-specific keymaps thinkpad-acpi: lock down size of hotkey keymap thinkpad-acpi: untangle ACPI/vendor backlight selection thinkpad-acpi: find ACPI video device by synthetic HID intel_ips: potential null dereference drivers/platform/x86: Adjust confusing if indentation x86: intel_ips: do not use PCI resources before pci_enable_device()
2010-08-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds10-16/+48
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: net: Fix a memmove bug in dev_gro_receive() net sched: fix some kernel memory leaks netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive Revert "netlink: netlink_recvmsg() fix" ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss xfrm: Use GFP_ATOMIC in xfrm_compile_policy ath5k: disable ASPM L0s for all cards ath9k_htc: load proper firmware for device ID 7015 wl1251: fix trigger scan timeout usage ath9k_htc: Fix disconnect issue in HT40 mode. ath9k_htc: fix panic on packet injection using airbase-ng tool. ipw2100: register pm_qos request before registering pci driver
2010-08-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds1-6/+9
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Fix atomic64_t routine return values. sparc64: Fix rwsem constant bug leading to hangs. sparc: Hook up new fanotify and prlimit64 syscalls. sparc: Really fix "console=" for serial consoles.
2010-08-17Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-2/+8
* master.kernel.org:/home/rmk/linux-2.6-arm: VIDEO: amba clcd: don't disable an already disabled clock ARM: Tighten check for allowable CPSR values ARM: 6329/1: wire up sys_accept4() on ARM ARM: 6328/1: Build with -fno-dwarf2-cfi-asm ARM: 6326/1: kgdb: fix GDB_MAX_REGS no longer used
2010-08-17arcmsr_hba: Missing slab.h includeDavid Miller1-0/+1
Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-17VIDEO: amba clcd: don't disable an already disabled clockRussell King1-2/+8
Fix the clock enable/disable tracking in the AMBA CLCD driver so that the driver doesn't try to disable an already disabled clock, thereby causing the clock (if shared) to become unbalanced. This resolves a problem with CLCD on LPC32xx ARM platforms. Reported-by: Kevin Wells <wellsk40@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-08-17of: fix missing headers for of_address_to_resource() in MTD and SysACE driversGraeme Smecher2-0/+2
The drivers for Xilinx' SystemACE and physically mapped MTDs were missing prototypes for of_address_to_resource(). This patch adds the necessary headers. Signed-off-by: Graeme Smecher <graeme.smecher@mail.mcgill.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-16of: Fix missing includesGrant Likely2-2/+2
This patch fixes missing includes from a number of .c files because the code (wrongfully) depended on prom.h including them. The include of linux/of_address.h was removed in microblaze prom.h in commit "of/address: Clean up function declarations" (sha1 id 22ae782f8), but not fixed in some callers. This patch fixes them up. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Michal Simek <monstr@monstr.eu>
2010-08-16ata: update for of_device to platform_device replacementStephen Rothwell1-2/+2
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-16Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David S. Miller1194-22433/+64897
2010-08-16vt,console,kdb: preserve console_blanked while in kdbJason Wessel1-0/+3
Commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement atomic console enter/leave functions) introduced the ability to atomically change the console mode with kernel mode setting but did not preserve the state of the console_blanked variable. The console_blanked variable must be restored when executing the con_debug_leave() or further kernel mode set changes (such as using chvt X) will fail to correctly set the state of console. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> CC: Andrew Morton <akpm@linux-foundation.org>
2010-08-16vt: fix regression warnings from KMS mergeJason Wessel1-4/+4
Fix the following new sparse warnings in vt.c introduced by the commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement atomic console enter/leave functions): drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static? drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static? drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static? drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static? Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> CC: Andrew Morton <akpm@linux-foundation.org>
2010-08-16Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6David S. Miller10-16/+48
2010-08-16sparc: Really fix "console=" for serial consoles.David S. Miller1-6/+9
If a video head and keyboard are hooked up, specifying "console=ttyS0" or similar to use a serial console will not work properly. The key issue is that we must register all serial console capable devices with register_console(), otherwise the command line specified device won't be found. The sun serial drivers would only register themselves as console devices if the OpenFirmware specified console device node matched. To fix this part we now unconditionally get the serial console register by setting serial_drv->cons always. Secondarily we must not add_preferred_console() using the firmware provided console setting if the user gaven an override on the kernel command line using "console=" The "primary framebuffer" matching logic was always triggering o n openfirmware device node match, make it not when a command line override was given. Reported-by: Frans Pop <elendil@planet.nl> Tested-by: Frans Pop <elendil@planet.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-16platform/x86: move rfkill for Dell Mini 1012 to compal-laptopVictor van den Elzen2-0/+16
Like others in the Mini series, the Dell Mini 1012 does not support the smbios hook required by dell-laptop. Signed-off-by: Victor van den Elzen <victor.vde@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboardsJens Taprogge1-1/+1
On the T410s and most likely other current models, Fn-F6 is labeled as Camera/Headphone key. Report key presses as KEY_CAMERA. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Acked-by: Jerone Young <jerone.young@canonical.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: add support for model-specific keymapsHenrique de Moraes Holschuh1-18/+42
Use the quirks engine to select model-specific keymaps, which makes it much easier to extend should we need it. Keycodes are based on the tables at http://www.thinkwiki.org/wiki/Default_meanings_of_special_keys. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: lock down size of hotkey keymapHenrique de Moraes Holschuh1-4/+15
Use a safer coding style for the hotkey keymap. This does not fix any problems, as the current code is correct. But it might help avoid mistakes in the future. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: untangle ACPI/vendor backlight selectionHenrique de Moraes Holschuh1-22/+20
acpi_video_backlight_support() already tells us if ACPI is handling backlight control through the generic ACPI handle. It is better to just trust it. While at it, adjust down a printk priority, and test earlier for brightness_enable=0. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16thinkpad-acpi: find ACPI video device by synthetic HIDHenrique de Moraes Holschuh1-40/+12
The Linux ACPI core locates the ACPI video devices for us and marks them with ACPI_VIDEO_HID. Use that information to locate the video device instead of a half-baked hunt for _BCL. This uncouples the detection of the number of backlight brightness levels on ThinkPads from the ACPI paths in vid_handle. With this change, the driver should be able to always detect whether the ThinkPad uses a 8-level or 16-level brightness scale even on newer models for which the vid_handle paths have not been updated yet. It will skip deactivated devices in the ACPI device tree, which is a change in behaviour. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-16intel_ips: potential null dereferenceDan Carpenter1-1/+3
There is a potential NULL dereference of "limits." We can just return NULL earlier to avoid it. The caller already handles NULL returns. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>