aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-05-07md: fix loading of out-of-date bitmap.NeilBrown
When md is loading a bitmap which it knows is out of date, it fills each page with 1s and writes it back out again. However the write_page call makes used of bitmap->file_pages and bitmap->last_page_size which haven't been set correctly yet. So this can sometimes fail. Move the setting of file_pages and last_page_size to before the call to write_page. This bug can cause the assembly on an array to fail, thus making the data inaccessible. Hence I think it is a suitable candidate for -stable. Cc: stable@kernel.org Reported-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: NeilBrown <neilb@suse.de>
2009-05-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: ide-cd: fix REQ_QUIET tests in cdrom_decode_status Fix up trivial conflicts in include/linux/blkdev.h
2009-05-02Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits) [ARM] 5489/1: ARM errata: Data written to the L2 cache can be overwritten with stale data [ARM] 5490/1: ARM errata: Processor deadlock when a false hazard is created [ARM] 5487/1: ARM errata: Stale prediction on replaced interworking branch [ARM] 5488/1: ARM errata: Invalidation of the Instruction Cache operation can fail davinci: DM644x: NAND: update partitioning davinci: update DM644x support in preparation for more SoCs davinci: DM644x: rename board file davinci: update pin-multiplexing support davinci: serial: generalize for more SoCs davinci: DM355 IRQ Definitions davinci: DM646x: add interrupt number and priorities davinci: PSC: Clear bits in MDCTL reg before setting new bits davinci: gpio bugfixes davinci: add EDMA driver davinci: timers: use clk_get_rate() [ARM] pxa/littleton: add missing da9034 touchscreen support [ARM] pxa/zylonite: configure GPIO18/19 correctly, used by 2 GPIO expanders [ARM] pxa/zylonite: fix the issue of unused SDATA_IN_1 pin get AC97 not working [ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC [ARM] pxa: remove unused CPU_FREQ_PXA Kconfig symbol ...
2009-05-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (53 commits) [SCSI] libosd: OSD2r05: on-the-wire changes for latest OSD2 revision 5. [SCSI] libosd: OSD2r05: OSD_CRYPTO_KEYID_SIZE will grow 20 => 32 bytes [SCSI] libosd: OSD2r05: Prepare for rev5 attribute list changes [SCSI] libosd: fix potential ERR_PTR dereference in osd_initiator.c [SCSI] mpt2sas : bump driver version to 01.100.02.00 [SCSI] mpt2sas: fix hotplug event processing [SCSI] mpt2sas : release diagnotic buffers prior host reset [SCSI] mpt2sas : Broadcast Primative AEN bug fix [SCSI] mpt2sas : Identify Dell series-7 adapters at driver load time [SCSI] mpt2sas : driver name needs to be in the MPT2IOCINFO ioctl [SCSI] mpt2sas : running out of message frames [SCSI] mpt2sas : fix oops when firmware sends large sense buffer size [SCSI] mpt2sas : the sanity check in base_interrupt needs to be on dword boundary [SCSI] mpt2sas : unique ioctl magic number [SCSI] fix sign extension with 1.5TB usb-storage LBD=y [SCSI] ipr: Fix sleeping function called with interrupts disabled [SCSI] fcoe: fip: add multicast filter to receive FIP advertisements. [SCSI] libfc: Fix compilation warnings with allmodconfig [SCSI] fcoe: fix spelling typos and bad comments [SCSI] fcoe: don't export functions that are internal to fcoe ...
2009-05-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: document the multi-touch (MT) protocol Input: add detailed multi-touch finger data report protocol Input: allow certain EV_ABS events to bypass all filtering Input: bcm5974 - add documentation for the driver Input: bcm5974 - augment debug information Input: bcm5974 - Add support for the Macbook 5 (Unibody) Input: bcm5974 - add quad-finger tapping Input: bcm5974 - prepare for a new trackpad header type Input: appletouch - fix DMA to/from stack buffer Input: wacom - fix TabletPC touch bug Input: lifebook - add DMI entry for Fujitsu B-2130 Input: ALPS - add signature for Toshiba Satellite Pro M10 Input: elantech - make sure touchpad is really in absolute mode Input: elantech - provide a workaround for jumpy cursor on firmware 2.34 Input: ucb1400 - use disable_irq_nosync() in irq handler Input: tsc2007 - use disable_irq_nosync() in irq handler Input: sa1111ps2 - use disable_irq_nosync() in irq handlers Input: omap-keypad - use disable_irq_nosync() in irq handler
2009-05-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: fix oops in hid_check_keys_pressed() HID: fix possible deadlock in usbhid_close() HID: Fix the support for apple mini aluminium keyboard HID: Add support for the G25 force feedback wheel in native mode HID: hidraw -- fix missing unlocks in unlocked_ioctl
2009-05-02ibft: fix the display of a few fields in the NIC attribute structure in sysfsAshutosh Naik
Fix the display of a few fields in the iBFT NIC attribute structure in sysfs. Ensure that, if the DHCP IP address and the subnet mask for the interface is present in the iBFT NIC structure, the corresponding entries are created in sysfs tree for the device. This would hence create the additional entries in the tree based on the iBFT table and would not delete any existing entries. Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com> Cc: Vishnu V <vishnu@chelsio.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-02vgacon: return the upper half of 512 character fontsStefan Bader
Uwe Geuder noted that he gets random bitmaps on a text console if he tried to type extended characters (like the e acute). For him everything above unicode 0xa0 was corrupted. After some digging there seems to be a little culprit in vgacon since the beginning of ages (well git). The function vgacon_font_get will store the number of characters correctly in font->charcount but then calls to vgacon_do_font_op(..., 0, 0). Which means only the lower 256 characters are actually stored to the fontdata. The rest is left untouched. So the next time that saved data is used, the garbled font appears. This happens on every switch between text consoles. Addresses https://bugs.launchpad.net/ubuntu/+source/linux/+bug/355057 Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Tested-by: Uwe Geuder <ubuntuLp-ugeuder@sneakemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-02CRISv10: fix serial driver proc-usageJesper Nilsson
drivers/serial/crisv10.c:4428: error: unknown field 'read_proc' specified in initializer Commit 0f043a81ebe84be3576667f04fdda481609e3816 ("proc tty: remove struct tty_operations::read_proc") removes the read_proc entry from struct tty_operations. Rework the proc handling in the CRISv10 serial driver to use proc_fops instead. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-02acpica: validate package element more carefully in ↵Robert Moore
acpi_rs_get_pci_routing_table_length acpi_rs_get_pci_routing_table_length is not performing sufficient validation on the package returned from _PRT. It assumes a package of packages and fails/faults if this is not the case. We should validate each subpackage when extracted from the parent package, and not accept objects of the wrong type, since that will just cause the scanning to fail (likely with a kernel oops). This can only happen with a serious BIOS bug, and is accompanied by a warning something like this: ACPI Warning (nspredef-0949): \_SB_.PCI0.PEG4._PRT: Return Package type mismatch at index 0 - found Integer, expected Package [20090320] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-02HID: fix oops in hid_check_keys_pressed()Jiri Kosina
If the device is not claimed by hid-input (i.e devices driver by userspace hiddev/hidraw-based drivers, or completely detached from HID and driver by libusb), we must not check the hid->inptus, as it is not guaranteed to be initialized, as this is performed only for devices handled by hid-input. Reported-by: Guillaume Chazarain <guichaz@gmail.com> Tested-by: Guillaume Chazarain <guichaz@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-30ide-cd: fix REQ_QUIET tests in cdrom_decode_statusBorislav Petkov
Original patch (dfa4411cc3a690011cab90e9a536938795366cf9) was buggy. This is a more proper fix which introduces blk_rq_quiet() macro alleviating the need for dumb, too short caching variables. Thanks to Helge Deller and Bart for debugging this. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Reported-and-tested-by: Helge Deller <deller@gmx.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-04-29Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect. V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM V4L/DVB (11570): patch: s2255drv: fix race condition on set mode V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error V4L/DVB (11561a): move media after i2c V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak V4L/DVB (11494a): cx231xx Kconfig fixes V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers
2009-04-29V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.Devin Heitmueller
A regression was introduced in hg changeset 33810c734a0d, which resulted in a kernel panic whenever the device was disconnected from USB. The call to 4l2_device_register() was overwriting the pointer for usb_set_intfdata(), so when au0828_usb_disconnect() was called, the usb_get_intfdata() returned a pointer to the v4l2_device instead of the au0828_dev structure. Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual ExpressChristopher Pascoe
Two fixes for DViCO FusionHDTV DVB-T Dual Express: * Reset correct tuner when reinitializing xc3028. * Disable the I2C gate control to avoid locking up the I2C bus. Tested-by: John Knops <jknops@australiaonline.net.au> Reviewed-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Christopher Pascoe <linuxdvb@itee.uq.edu.au> Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PMSascha Hauer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11570): patch: s2255drv: fix race condition on set modeDean Anderson
set_modeready flag must be set before command sent to USB in s2255_write_config. Signed-off-by: Dean Anderson <dean@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11568): cx18: Fix the handling of i2c bus registration errorJean Delvare
* Return actual error values as returned by the i2c subsystem, rather than 0 or 1. * If the registration of the second bus fails, unregister the first one before exiting, otherwise we are leaking resources. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11561a): move media after i2cGuennadi Liakhovetski
Currently drivers/media drivers are linked very early - directly after base, block, misc, and mfd and before ata, scsi, ide, input, firewire, usb, and i2c. This breaks static build of video4linux drivers, that use generic CPU i2c adapter drivers and the v4l2-subdev subsystem, because during video4linux probing the v4l2-subdev core requires a struct i2c_adapter context, which cannot be satisfied before the i2c subsystem is initialised. Moving drivers/media after drivers/i2c fixes this problem. The best way to trigger action is by submitting a patch:-) So, let's see what comes out of it - on the one hand I don't see any reason why media has to be linked this early, and nobody was able to give me one yesterday as this problem has been discussed on linux-media, OTOH, maybe indeed it would be better to move i2c the whole way up above media, but that'd be much bigger of a change, I think. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-freeDan Carpenter
I lowered the kfree(t) down a couple lines and removed the superflous "t->vdev = NULL;" Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leakDan Carpenter
I moved the kfree() down a couple lines. t->vdev is going to be in freed memory so there is no point setting it to NULL. I added a kfree(t) on a Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11494a): cx231xx Kconfig fixesMauro Carvalho Chehab
selecting ALSA module breaks if !SND. Just remove select. While here, let's fix the whitespacing at the Kconfig. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11494): cx18: Send correct input routing value to external audio ↵Andy Walls
multiplexers A late v4l2_subdev framework change accidentally sent the audio input routing value to the external multiplexer, instead of the muxer input routing value to the external multiplexer. This change corrects that error. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29HID: fix possible deadlock in usbhid_close()Oliver Neukum
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-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits) e100: do not go D3 in shutdown unless system is powering off netfilter: revised locking for x_tables Bluetooth: Fix connection establishment with low security requirement Bluetooth: Add different pairing timeout for Legacy Pairing Bluetooth: Ensure that HCI sysfs add/del is preempt safe net: Avoid extra wakeups of threads blocked in wait_for_packet() net: Fix typo in net_device_ops description. ipv4: Limit size of route cache hash table Add reference to CAPI 2.0 standard Documentation/isdn/INTERFACE.CAPI update Documentation/isdn/00-INDEX ixgbe: Fix WoL functionality for 82599 KX4 devices veth: prevent oops caused by netdev destructor xfrm: wrong hash value for temporary SA forcedeth: tx timeout fix net: Fix LL_MAX_HEADER for CONFIG_TR_MODULE mlx4_en: Handle page allocation failure during receive mlx4_en: Fix cleanup flow on cq activation vlan: update vlan carrier state for admin up/down netfilter: xt_recent: fix stack overread in compat code ...
2009-04-29HID: Fix the support for apple mini aluminium keyboardUlrich Dangel
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-28e100: do not go D3 in shutdown unless system is powering offThadeu Lima de Souza Cascardo
After experimenting with kexec with the last merges after 2.6.29, I've had some problems when probing e100. It would not read the eeprom. After some bisects, I realized this has been like that since forever (at least 2.6.18). The problem is that shutdown is doing the same thing that suspend does and puts the device in D3 state. I couldn't find a way to get the device back to a sane state in the probe function. So, based on some similar patches from Rafael J. Wysocki for e1000, e1000e, and ixgbe, I wrote this one for e100. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-28Merge branch 'drm-intel-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: fix up error path leak in i915_cmdbuffer drm/i915: fix unpaired i915 device mutex on entervt failure. drm/i915: add support for G41 chipset drm/i915: Enable ASLE if present drm/i915: Unregister ACPI video driver when exiting drm/i915: Register ACPI video even when not modesetting drm/i915: fix transition to I915_TILING_NONE drm/i915: Don't let an oops get triggered from irq_emit without dma init. drm/i915: allow tiled front buffers on 965+
2009-04-28Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (21 commits) RDMA/nes: Update iw_nes version RDMA/nes: Fix error path in nes_accept() RDMA/nes: Fix hang issues for large cluster dynamic connections RDMA/nes: Increase rexmit timeout interval RDMA/nes: Check for sequence number wrap-around RDMA/nes: Do not set apbvt entry for loopback RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n RDMA/nes: Fix fw_ver in /sys RDMA/nes: Set trace length to 1 inch for SFP_D RDMA/nes: Enable repause timer for port 1 RDMA/nes: Correct CDR loop filter setting for port 1 RDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq() RDMA/nes: Remove root_256()'s unused pbl_count_256 parameter mlx4_core: Fix memory leak in mlx4_enable_msi_x() IB/mthca: Fix timeout for INIT_HCA and a few other commands RDMA/cxgb3: Don't zero QP attrs when moving to IDLE RDMA/nes: Fix bugs in nes_reg_phys_mr() RDMA/nes: Fix compiler warning at nes_verbs.c:1955 IPoIB: Disable NAPI while CQ is being drained ...
2009-04-28Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: bio: fix memcpy corruption in bio_copy_user_iov() hd: fix locking mg_disk: fix CONFIG_LBD=y warning mg_disk: fix locking
2009-04-28Merge branches 'cxgb3', 'ipoib', 'mthca', 'mlx4' and 'nes' into for-linusRoland Dreier
2009-04-28hd: fix lockingTejun Heo
hd dance around local irq and HD_IRQ enable without achieving much. It ends up transferring data from irq handler with both local irq and HD_IRQ disabled. The only place it actually does something is while transferring the first block of a request which it does with HD_IRQ disabled but local irq enabled. Unfortunately, the dancing is horribly broken from locking POV. IRQ and timeout handlers access block queue without grabbing the queue lock and running the driver in SMP configuration crashes the whole machine pretty quickly. Remove meaningless irq enable/disable dancing and add proper locking in issue, irq and timeout paths. Signed-off-by: Tejun Heo <tj@kernel.org>
2009-04-28mg_disk: fix CONFIG_LBD=y warningBartlomiej Zolnierkiewicz
drivers/block/mg_disk.c: In function ‘mg_dump_status’: drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘sector_t’ [ Impact: kill build warning ] Cc: unsik Kim <donari75@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2009-04-28mg_disk: fix lockingTejun Heo
IRQ and timeout handlers call functions which expect locked queue lock without locking it. Fix it. While at it, convert 0s used as null pointer constant to NULLs. [ Impact: fix locking, cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: unsik Kim <donari75@gmail.com>
2009-04-28regulator: Fix default constraints for fixed voltage regulatorsMark Brown
Default voltage constraints were being provided for fixed voltage regulator where board constraints were not provided but these constraints used INT_MIN as the default minimum voltage which is not a valid value since it is less than zero. Use 1uV instead. Also set the default values we set in the constraints themselves since otherwise the max_uV constraint we determine will not be stored in the actual constraint strucutre and will therefore not be used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28regulator/bq24022: fix bug in is_enabled functionPhilipp Zabel
This seems to be fallout from last October's regulator core rework. It got noticed only because of recent regulator framework changes. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28regulator/virtual: fix strings compare predicatesMike Rapoport
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28regulator core: fix double-free in regulator_register() error pathPaul Walmsley
During regulator registration, any error after device_register() will cause a double-free on the struct regulator_dev 'rdev'. The bug is in drivers/regulator/core.c:regulator_register(): ... scrub: device_unregister(&rdev->dev); clean: kfree(rdev); <--- rdev = ERR_PTR(ret); goto out; ... device_unregister() calls regulator_dev_release() which frees rdev. The subsequent kfree corrupts memory and causes some OMAP3 systems to oops on boot in regulator_get(). Applies against 2.6.30-rc3. Signed-off-by: Paul Walmsley <paul@pwsan.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or ↵Diego Liziero
REGULATOR_CURRENT When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT the if should probably return ERR_PTR(-EINVAL) The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) @@ expression E; constant C; @@ ( - !E == C + E != C ) Signed-off-by: Diego Liziero <diegoliz@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28unreachable code in drms_uA_update()Dan Carpenter
I removed the extra semi-colon and indented the return statement. The unreachable code was found by smatch (http://repo.or.cz/w/smatch.git). The patch was compile tested. regards, dan carpenter Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28Input: add detailed multi-touch finger data report protocolHenrik Rydberg
In order to utilize the full power of the new multi-touch devices, a way to report detailed finger data to user space is needed. This patch adds a multi-touch (MT) protocol which allows drivers to report details for an arbitrary number of fingers. The driver sends a SYN_MT_REPORT event via the input_mt_sync() function when a complete finger has been reported. In order to stay compatible with existing applications, the data reported in a finger packet must not be recognized as single-touch events. In addition, all finger data must bypass input filtering, since subsequent events of the same type refer to different fingers. A set of ABS_MT events with the desired properties are defined. The events are divided into categories, to allow for partial implementation. The minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size of the approaching finger. Anisotropy and direction may be specified with ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. Devices with more granular information may specify general shapes as blobs, i.e., as a sequence of rectangular shapes grouped together by a ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a finger or a pen. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: allow certain EV_ABS events to bypass all filteringHenrik Rydberg
With the upcoming multi-touch interface as an example, there is a need to make certain that all reported events actually get passed to the event handler. This patch equips the input core with the ability to bypass all filtering for certain EV_ABS events. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: bcm5974 - augment debug informationHenrik Rydberg
Add more button and finger data to the debug output. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: bcm5974 - Add support for the Macbook 5 (Unibody)Henrik Rydberg
This patch adds support for the new unibody Macbook, with physically integrated button and trackpad. Since the integrated button changes the logic for touch-and-click, a device capability bit mask is now reported in input_id.version, which can be picked up by user space via a EVIOCGID call. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Tested-by: David M. Lary <dmlary@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: bcm5974 - add quad-finger tappingHenrik Rydberg
The integrated button on the new unibody Macbooks presents a need to report explicit four-finger actions. Evidently, the finger pressing the button is also touching the trackpad, so in order to fully support three-finger actions, the driver must be able to report four-finger actions. This patch adds a new button, BTN_TOOL_QUADTAP, which achieves this. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: bcm5974 - prepare for a new trackpad header typeHenrik Rydberg
The new unibody Macbooks are equipped with an integrated button and trackpad. The package header of the trackpad interface has changed to also contain information about the integrated button. This patch performs the necessary preparations to allow for the new package header. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: appletouch - fix DMA to/from stack bufferBob Copeland
CONFIG_DMA_API_DEBUG spotted an instance of appletouch using an array on the stack as a DMA buffer for certain hardware. Change it to use a kmalloc()ed buffer instead. Signed-off-by: Bob Copeland <me@bobcopeland.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-28Input: wacom - fix TabletPC touch bugPing Cheng
This patch fixed a bug that was introduced in kernel 2.6.28 for TabletPC touch data. The wacom_parse_hid routine in wacom_sys.c should always return 0 even when usb_control_msg got an error. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-27RDMA/nes: Update iw_nes versionChien Tung
Update version number to 1.5.0.0 Signed-off-by: Chien Tung <chien.tin.tung@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-04-27RDMA/nes: Fix error path in nes_accept()Faisal Latif
If reg_phys_mem() fails, we need to free memory allocated for MPA frame with private data before returning the error. Also move nes_add_ref() after the reg_phys_mem() is successful. Signed-off-by: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>