GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
15 years agoregulator: Add WM831x DC-DC buck convertor support
Mark Brown [Tue, 28 Jul 2009 14:21:49 +0000 (15:21 +0100)]
regulator: Add WM831x DC-DC buck convertor support

The WM831x series of devices all have 3 DC-DC buck convertors. This
driver implements software control for these regulators via the
regulator API.  Use with split hardware/software control of individual
regulators is not supported, though regulators not controlled by
software may be controlled via the hardware control interfaces.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agoregulator: Provide mode to status conversion function
Mark Brown [Tue, 4 Aug 2009 18:09:52 +0000 (20:09 +0200)]
regulator: Provide mode to status conversion function

This is useful for implementing get_status() in terms of get_mode().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agoinput: Add support for the WM831x ON pin
Mark Brown [Tue, 15 Sep 2009 10:07:12 +0000 (12:07 +0200)]
input: Add support for the WM831x ON pin

The WM831x series of PMICs support control of initial power on
through the ON pin on the device with soft control of the pin
at other times. Represent this to userspace as KEY_POWER.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agohwmon: WM831x PMIC hardware monitoring driver
Mark Brown [Tue, 28 Jul 2009 14:52:22 +0000 (15:52 +0100)]
hwmon: WM831x PMIC hardware monitoring driver

This driver adds support for the hardware monitoring features of
the WM831x PMICs to the hwmon API. Monitoring is provided for
the system voltages supported natively by the WM831x, the chip
temperature, the battery temperature and the auxiliary inputs
of the WM831x.

Currently no alarms are supported, though digital comparators on
the WM831x devices would allow these to be provided.

Since the auxiliary and battery temperature input scaling depends
on the system configuration the value is reported as a voltage to
userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agogpio: Add WM831X GPIO driver
Mark Brown [Mon, 27 Jul 2009 13:46:00 +0000 (14:46 +0100)]
gpio: Add WM831X GPIO driver

Add support for the GPIO pins on the WM831x. No direct support is
currently supplied for configuring non-gpiolib functionality such
as pull configuration and alternate functions, soft configuration
of these will be provided in a future patch.

Currently use of these pins as interrupts is not supported due to
the ongoing issues with generic irq not support interrupt controllers
on interrupt driven buses. Users can directly request the interrupts
with the wm831x-specific APIs currently provided if required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Hook WM831x into build system
Mark Brown [Mon, 27 Jul 2009 13:45:58 +0000 (14:45 +0100)]
mfd: Hook WM831x into build system

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Export ISEL values from WM831x core
Mark Brown [Mon, 27 Jul 2009 13:45:57 +0000 (14:45 +0100)]
mfd: Export ISEL values from WM831x core

The current settings which can be used with the WM831x current sinks
can't easily be mapped between register values and currents at run
time without a lookup table since the values scale logarithmically
to match the way the human eye interprets brightness. This lookup
table is inclided in the core since several drivers need to use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Add basic WM831x OTP support
Mark Brown [Mon, 27 Jul 2009 13:45:56 +0000 (14:45 +0100)]
mfd: Add basic WM831x OTP support

The WM831x series of devices use OTP (One Time Programmable, a type
of PROM) to store system configuration. At run time this data is
visible via registers.

Currently the only explicitly supported feature is that the unique
ID provided by every WM831x device is exported to user space via
sysfs. Other configuration data may be read by system-specific
code in the pre_init() and post_init() platform data operations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Conditionally add WM831x backlight subdevice
Mark Brown [Mon, 27 Jul 2009 13:45:55 +0000 (14:45 +0100)]
mfd: Conditionally add WM831x backlight subdevice

The WM831x backlight driver requires at least the specification of the
current sink to use and a maximum current to allow them to function and
will actively interfere with other users of the regulators it uses if
misconfigured so only register the subdevice for it if this platform
data has been supplied.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Add WM831x AUXADC support
Mark Brown [Mon, 27 Jul 2009 13:45:54 +0000 (14:45 +0100)]
mfd: Add WM831x AUXADC support

The WM831x contains an auxiliary ADC with a number of switchable
inputs which is used to monitor some of the voltages and
temperatures in the system and has some external inputs which can be
used for machine specific purposes. Provide an API allowing drivers
to read values from the ADC.

An internal reference voltage is provided to allow callibration of
the ADC. This is used to calibrate the device at startup.

The hardware also supports continuous readings and digital comparators.
These are not yet supported by the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Add WM831x interrupt support
Mark Brown [Mon, 27 Jul 2009 13:45:53 +0000 (14:45 +0100)]
mfd: Add WM831x interrupt support

The WM831x includes an interrupt controller managing interrupts for
the various functions on the chip. This patch adds support for the
core interrupt block on the device.

Ideally this would be supported by genirq, particularly for the
GPIOs, but currently genirq is unable to cope with controllers on
interrupt driven buses so we cut'n'paste the generic interface.
Once genirq is able to cope chips like this it should be a case
of filing the prefixes off the code and redoing wm831x-irq.c to
move over.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Initial core support for WM831x series devices
Mark Brown [Mon, 27 Jul 2009 13:45:52 +0000 (14:45 +0100)]
mfd: Initial core support for WM831x series devices

The WM831x series of devices are register compatible processor power
management subsystems, providing regulator and power path management
facilities along with other services like watchdog, RTC and touch
panel controllers.

This patch adds very basic support, providing basic single register
I2C access, handling of the security key and registration of the
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Allow multiple MFD cells with the same name
Mark Brown [Mon, 27 Jul 2009 13:45:51 +0000 (14:45 +0100)]
mfd: Allow multiple MFD cells with the same name

Provide basic support for MFDs having multiple cells of a given
type with different IDs by adding an id to the mfd_cell structure
and then adding that to the id passed in to mfd_add_devices().

As it stands this approach requires that MFDs using this feature
deal with ensuring that there aren't any ID collisions resulting
from multiple MFDs of the same type being instantiated. This needs
to happen with the existing code too, but with this approach there
is a knock on effect on the IDs for non-duplicated devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: register ezx-pcap earlier
Antonio Ospite [Fri, 31 Jul 2009 22:55:45 +0000 (15:55 -0700)]
mfd: register ezx-pcap earlier

Register ezx-pcap earlier so it can be used with cpufreq

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Remove VIB defines from pcap header file
Daniel Ribeiro [Fri, 31 Jul 2009 10:38:02 +0000 (12:38 +0200)]
mfd: Remove VIB defines from pcap header file

Vibrator will be accessed via the pcap-regulator driver, no need to expose its
bits in the header file.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Correct ro and cd implemantion on DM355
Vipin Bhandari [Thu, 30 Jul 2009 08:19:17 +0000 (04:19 -0400)]
mfd: Correct ro and cd implemantion on DM355

This patch corrects the support for MMCSD card detection
and read only feature for SoC DM355.

EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that
Bit 2 and 4 should be checked for card detection. However
on the EVM, bits 1 and 3 gives this status, for MMC/SD
instance 0 and 1 respectively. The pdf also suggests that
Bit 1 and 3 should be checked for write protection. However
on the EVM bits 2 and 4 gives this status.

This document can be downloaded from
http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf

Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: fix wrong define for 10bit pcf50633 ADC mode
Paul Fertser [Mon, 27 Jul 2009 21:09:04 +0000 (01:09 +0400)]
mfd: fix wrong define for 10bit pcf50633 ADC mode

The 10 bits definition was the 8 bits one.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: revise locking for pcf50633 ADC
Paul Fertser [Mon, 27 Jul 2009 20:58:48 +0000 (00:58 +0400)]
mfd: revise locking for pcf50633 ADC

Current implementation is prone to races, this patch attempts to remove all
but one (in pcf50633_adc_sync_read).

The idea is that we need to guard the queue access only on inserting and
removing items. If we insert and there're no more items in the queue it
means that the last irq already happened and we need to trigger ADC
manually. If not, then the next conversion will be triggered by the irq
handler upon completion of the previous.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: use a dedicated workqueue for pcf50633 irq processing
Paul Fertser [Mon, 27 Jul 2009 20:41:15 +0000 (00:41 +0400)]
mfd: use a dedicated workqueue for pcf50633 irq processing

Using the default kernel "events" workqueue causes problems with
synchronous adc readings if initiated from some task on the same
workqueue.

I had a deadlock trying to use pcf50633_adc_sync_read from a
power_supply class driver because the reading was initiated from the
workqueue and it waited for the irq processing to complete (to get the
result) and that was put on the same workqueue.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Add twl4030-pwrbutton as a twl4030 child
Felipe Balbi [Mon, 3 Aug 2009 16:16:38 +0000 (18:16 +0200)]
mfd: Add twl4030-pwrbutton as a twl4030 child

Make that twl4030-pwrbutton.c driver probe with current
child creation api for twl4030.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agohwmon: Add WM835x PMIC hardware monitoring driver
Mark Brown [Mon, 20 Jul 2009 11:43:45 +0000 (12:43 +0100)]
hwmon: Add WM835x PMIC hardware monitoring driver

This driver provides reporting of the status supply voltage rails
of the WM835x series of PMICs via the hwmon API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agoregulator: add pcap driver
Daniel Ribeiro [Sat, 27 Jun 2009 03:18:02 +0000 (00:18 -0300)]
regulator: add pcap driver

Add (partial) support for the voltage regulators on the PCAP2 PMIC.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agoMAINTAINERS: Add entry for Wolfson PMIC drivers
Mark Brown [Thu, 2 Jul 2009 15:43:08 +0000 (16:43 +0100)]
MAINTAINERS: Add entry for Wolfson PMIC drivers

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: remove unnecessary semicolons from twl4030
Joe Perches [Sun, 28 Jun 2009 16:26:30 +0000 (09:26 -0700)]
mfd: remove unnecessary semicolons from twl4030

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: add ezx_pcap_setbits
Daniel Ribeiro [Sat, 27 Jun 2009 03:17:20 +0000 (00:17 -0300)]
mfd: add ezx_pcap_setbits

Provides an atomic set_bits functions, as needed by the pcap-regulator
driver.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: fix pcap irq bottom handler
Daniel Ribeiro [Tue, 23 Jun 2009 15:34:13 +0000 (12:34 -0300)]
mfd: fix pcap irq bottom handler

Mask interrupts before servicing them and loop while pcap asserts the interrupt
line.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: add set_ts_bits for pcap
Daniel Ribeiro [Tue, 23 Jun 2009 15:33:10 +0000 (12:33 -0300)]
mfd: add set_ts_bits for pcap

Some TS controller bits are on the same register as the ADC control, save
TS specific bits and export a set_ts_bits function so the TS driver can set
it with the adc_mutex lock held.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Introduce irq_to_pcap()
Daniel Ribeiro [Tue, 23 Jun 2009 15:32:11 +0000 (12:32 -0300)]
mfd: Introduce irq_to_pcap()

Export an irq_to_pcap function to get pcap irq number, for the keypad driver.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: fix ab3100 warning on x86_64
Samuel Ortiz [Tue, 23 Jun 2009 08:48:36 +0000 (10:48 +0200)]
mfd: fix ab3100 warning on x86_64

The file_operations write prototype should return a ssize_t.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Wed, 16 Sep 2009 15:27:10 +0000 (08:27 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev
  debugfs: Modify default debugfs directory for debugging pktcdvd.
  debugfs: Modified default dir of debugfs for debugging UHCI.
  debugfs: Change debugfs directory of IWMC3200
  debugfs: Change debuhgfs directory of trace-events-sample.h
  debugfs: Fix mount directory of debugfs by default in events.txt
  hpilo: add poll f_op
  hpilo: add interrupt handler
  hpilo: staging for interrupt handling
  driver core: platform_device_add_data(): use kmemdup()
  Driver core: Add support for compatibility classes
  uio: add generic driver for PCI 2.3 devices
  driver-core: move dma-coherent.c from kernel to driver/base
  mem_class: fix bug
  mem_class: use minor as index instead of searching the array
  driver model: constify attribute groups
  UIO: remove 'default n' from Kconfig
  Driver core: Add accessor for device platform data
  Driver core: move dev_get/set_drvdata to drivers/base/dd.c
  Driver core: add new device to bus's list before probing

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Wed, 16 Sep 2009 15:11:54 +0000 (08:11 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (641 commits)
  Staging: remove sxg driver
  Staging: remove heci driver
  Staging: remove at76_usb wireless driver.
  Staging: rspiusb: remove the driver
  Staging: meilhaus: remove the drivers
  Staging: remove me4000 driver.
  Staging: line6: ffzb returns an unsigned integer
  Staging: line6: pod.c: style cleanups
  Staging: iio: introduce missing kfree
  Staging: dream: introduce missing kfree
  Staging: comedi: addi-data: NULL dereference of amcc in v_pci_card_list_init()
  Staging: vt665x: fix built-in compiling
  Staging: rt3090: enable NATIVE_WPA_SUPPLICANT_SUPPORT option
  Staging: rt3090: port changes in WPA_MIX_PAIR_CIPHER to rt3090
  Staging: rt3090: rename device from raX to wlanX
  Staging: rt3090: remove possible conflict with rt2860
  Staging: rt2860/rt2870/rt3070/rt3090: fix compiler warning on x86_64
  Staging: rt2860: add new device ids
  Staging: rt3090: add device id 1462:891a
  Staging: asus_oled: Cleaned up checkpatch issues.
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pcmcia-2.6
Linus Torvalds [Wed, 16 Sep 2009 15:11:23 +0000 (08:11 -0700)]
Merge git://git./linux/kernel/git/gregkh/pcmcia-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pcmcia-2.6:
  pcmcia: document return value of pcmcia_loop_config
  pcmcia: dtl1_cs: fix pcmcia_loop_config logic
  pcmcia: drop non-existant includes
  pcmcia: disable prefetch/burst for OZ6933
  pcmcia: fix incorrect argument order to list_add_tail()
  pcmcia: drivers/pcmcia/pcmcia_resource.c: Remove unnecessary semicolons
  pcmcia: Use phys_addr_t for physical addresses
  pcmcia: drivers/pcmcia: Make static

15 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Wed, 16 Sep 2009 14:49:54 +0000 (07:49 -0700)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (75 commits)
  PCI hotplug: clean up acpi_run_hpp()
  PCI hotplug: acpiphp: use generic pci_configure_slot()
  PCI hotplug: shpchp: use generic pci_configure_slot()
  PCI hotplug: pciehp: use generic pci_configure_slot()
  PCI hotplug: add pci_configure_slot()
  PCI hotplug: clean up acpi_get_hp_params_from_firmware() interface
  PCI hotplug: acpiphp: don't cache hotplug_params in acpiphp_bridge
  PCI hotplug: acpiphp: remove superfluous _HPP/_HPX evaluation
  PCI: Clear saved_state after the state has been restored
  PCI PM: Return error codes from pci_pm_resume()
  PCI: use dev_printk in quirk messages
  PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()
  PCI Hotplug: convert acpi_pci_detect_ejectable() to take an acpi_handle
  PCI Hotplug: acpiphp: find bridges the easy way
  PCI: pcie portdrv: remove unused variable
  PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support
  ACPI PM: Replace wakeup.prepared with reference counter
  PCI PM: Introduce device flag wakeup_prepared
  PCI / ACPI PM: Rework some debug messages
  PCI PM: Simplify PCI wake-up code
  ...

Fixed up conflict in arch/powerpc/kernel/pci_64.c due to OF device tree
scanning having been moved and merged for the 32- and 64-bit cases.  The
'needs_freset' initialization added in 6e19314cc ("PCI/powerpc: support
PCIe fundamental reset") is now in arch/powerpc/kernel/pci_of_scan.c.

15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Wed, 16 Sep 2009 14:46:34 +0000 (07:46 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: fix linkage problem with blk_iopoll and !CONFIG_BLOCK

15 years agoMerge branch 'writeback' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Wed, 16 Sep 2009 14:45:38 +0000 (07:45 -0700)]
Merge branch 'writeback' of git://git.kernel.dk/linux-2.6-block

* 'writeback' of git://git.kernel.dk/linux-2.6-block:
  writeback: fix possible bdi writeback refcounting problem
  writeback: Fix bdi use after free in wb_work_complete()
  writeback: improve scalability of bdi writeback work queues
  writeback: remove smp_mb(), it's not needed with list_add_tail_rcu()
  writeback: use schedule_timeout_interruptible()
  writeback: add comments to bdi_work structure
  writeback: splice dirty inode entries to default bdi on bdi_destroy()
  writeback: separate starting of sync vs opportunistic writeback
  writeback: inline allocation failure handling in bdi_alloc_queue_work()
  writeback: use RCU to protect bdi_list
  writeback: only use bdi_writeback_all() for WB_SYNC_NONE writeout
  fs: Assign bdi in super_block
  writeback: make wb_writeback() take an argument structure
  writeback: merely wakeup flusher thread if work allocation fails for WB_SYNC_NONE
  writeback: get rid of wbc->for_writepages
  fs: remove bdev->bd_inode_backing_dev_info

15 years agowriteback: fix possible bdi writeback refcounting problem
Nick Piggin [Tue, 15 Sep 2009 19:37:55 +0000 (21:37 +0200)]
writeback: fix possible bdi writeback refcounting problem

wb_clear_pending AFAIKS should not be called after the item has been
put on the list, except by the worker threads. It could lead to the
situation where the refcount is decremented below 0 and cause lots of
problems.

Presumably the !wb_has_dirty_io case is not a common one, so it can
be discovered when the thread wakes up to check?

Also add a comment in bdi_work_clear.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: Fix bdi use after free in wb_work_complete()
Nick Piggin [Tue, 15 Sep 2009 19:34:51 +0000 (21:34 +0200)]
writeback: Fix bdi use after free in wb_work_complete()

By the time bdi_work_on_stack gets evaluated again in bdi_work_free, it
can already have been deallocated and used for something else in the
!on stack case, giving a false positive in this test and causing
corruption.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: improve scalability of bdi writeback work queues
Nick Piggin [Tue, 15 Sep 2009 19:34:12 +0000 (21:34 +0200)]
writeback: improve scalability of bdi writeback work queues

If you're going to do an atomic RMW on each list entry, there's not much
point in all the RCU complexities of the list walking. This is only going
to help the multi-thread case I guess, but it doesn't hurt to do now.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: remove smp_mb(), it's not needed with list_add_tail_rcu()
Nick Piggin [Tue, 15 Sep 2009 19:32:58 +0000 (21:32 +0200)]
writeback: remove smp_mb(), it's not needed with list_add_tail_rcu()

list_add_tail_rcu contains required barriers.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: use schedule_timeout_interruptible()
Jens Axboe [Tue, 15 Sep 2009 19:27:40 +0000 (21:27 +0200)]
writeback: use schedule_timeout_interruptible()

Gets rid of a manual set_current_state().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: add comments to bdi_work structure
Jens Axboe [Tue, 15 Sep 2009 18:04:57 +0000 (20:04 +0200)]
writeback: add comments to bdi_work structure

And document its retriever, get_next_work_item().

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: splice dirty inode entries to default bdi on bdi_destroy()
Jens Axboe [Mon, 14 Sep 2009 10:57:56 +0000 (12:57 +0200)]
writeback: splice dirty inode entries to default bdi on bdi_destroy()

We cannot safely ensure that the inodes are all gone at this point
in time, and we must not destroy this bdi with inodes having off it.
So just splice our entries to the default bdi since that one will
always persist.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: separate starting of sync vs opportunistic writeback
Jens Axboe [Wed, 16 Sep 2009 13:13:54 +0000 (15:13 +0200)]
writeback: separate starting of sync vs opportunistic writeback

bdi_start_writeback() is currently split into two paths, one for
WB_SYNC_NONE and one for WB_SYNC_ALL. Add bdi_sync_writeback()
for WB_SYNC_ALL writeback and let bdi_start_writeback() handle
only WB_SYNC_NONE.

Push down the writeback_control allocation and only accept the
parameters that make sense for each function. This cleans up
the API considerably.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: inline allocation failure handling in bdi_alloc_queue_work()
Jens Axboe [Sun, 13 Sep 2009 18:07:36 +0000 (20:07 +0200)]
writeback: inline allocation failure handling in bdi_alloc_queue_work()

This gets rid of work == NULL in bdi_queue_work() and puts the
OOM handling where it belongs.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: use RCU to protect bdi_list
Jens Axboe [Mon, 14 Sep 2009 11:12:40 +0000 (13:12 +0200)]
writeback: use RCU to protect bdi_list

Now that bdi_writeback_all() no longer handles integrity writeback,
it doesn't have to block anymore. This means that we can switch
bdi_list reader side protection to RCU.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: only use bdi_writeback_all() for WB_SYNC_NONE writeout
Jens Axboe [Tue, 15 Sep 2009 07:53:35 +0000 (09:53 +0200)]
writeback: only use bdi_writeback_all() for WB_SYNC_NONE writeout

Data integrity writeback must use bdi_start_writeback() and ensure
that wbc->sb and wbc->bdi are set.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agofs: Assign bdi in super_block
Jens Axboe [Wed, 16 Sep 2009 13:02:33 +0000 (15:02 +0200)]
fs: Assign bdi in super_block

We do this automatically in get_sb_bdev() from the set_bdev_super()
callback. Filesystems that have their own private backing_dev_info
must assign that in ->fill_super().

Note that ->s_bdi assignment is required for proper writeback!

Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: make wb_writeback() take an argument structure
Jens Axboe [Wed, 16 Sep 2009 13:18:25 +0000 (15:18 +0200)]
writeback: make wb_writeback() take an argument structure

We need to be able to pass in range_cyclic as well, so instead
of growing yet another argument, split the arguments into a
struct wb_writeback_args structure that we can use internally.
Also makes it easier to just copy all members to an on-stack
struct, since we can't access work after clearing the pending
bit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: merely wakeup flusher thread if work allocation fails for WB_SYNC_NONE
Christoph Hellwig [Fri, 11 Sep 2009 07:47:56 +0000 (09:47 +0200)]
writeback: merely wakeup flusher thread if work allocation fails for WB_SYNC_NONE

Since it's an opportunistic writeback and not a data integrity action,
don't punt to blocking writeback. Just wakeup the thread and it will
flush old data.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agowriteback: get rid of wbc->for_writepages
Jens Axboe [Tue, 15 Sep 2009 13:10:20 +0000 (15:10 +0200)]
writeback: get rid of wbc->for_writepages

It's only set, it's never checked. Kill it.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agofs: remove bdev->bd_inode_backing_dev_info
Jens Axboe [Tue, 15 Sep 2009 07:43:56 +0000 (09:43 +0200)]
fs: remove bdev->bd_inode_backing_dev_info

It has been unused since it was introduced in:

commit 520808bf20e90fdbdb320264ba7dd5cf9d47dcac
Author: Andrew Morton <akpm@osdl.org>
Date:   Fri May 21 00:46:17 2004 -0700

    [PATCH] block device layer: separate backing_dev_info infrastructure

So lets just kill it.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: fix linkage problem with blk_iopoll and !CONFIG_BLOCK
Jens Axboe [Tue, 15 Sep 2009 19:53:11 +0000 (21:53 +0200)]
block: fix linkage problem with blk_iopoll and !CONFIG_BLOCK

 kernel/built-in.o:(.data+0x17b0): undefined reference to `blk_iopoll_enabled'

Since the extern declaration makes the compile work, but the actual
symbol is missing when block/blk-iopoll.o isn't linked in.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoslub: Fix build error in kmem_cache_open() with !CONFIG_SLUB_DEBUG
Ingo Molnar [Tue, 15 Sep 2009 09:00:26 +0000 (11:00 +0200)]
slub: Fix build error in kmem_cache_open() with !CONFIG_SLUB_DEBUG

This build bug:

 mm/slub.c: In function 'kmem_cache_open':
 mm/slub.c:2476: error: 'disable_higher_order_debug' undeclared (first use in this function)
 mm/slub.c:2476: error: (Each undeclared identifier is reported only once
 mm/slub.c:2476: error: for each function it appears in.)

Triggers because there's no !CONFIG_SLUB_DEBUG definition for
disable_higher_order_debug.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
15 years agoStaging: remove sxg driver
Greg Kroah-Hartman [Tue, 15 Sep 2009 17:09:27 +0000 (10:09 -0700)]
Staging: remove sxg driver

Unfortunatly, the upstream company has abandonded development of this
driver.  So it's best to just remove the driver from the tree.

Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: remove heci driver
Greg Kroah-Hartman [Fri, 11 Sep 2009 16:46:35 +0000 (09:46 -0700)]
Staging: remove heci driver

Intel has officially abandoned this project and does not want to
maintian it or have it included in the main kernel tree, as no one
should use the code, it's not needed anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: remove at76_usb wireless driver.
Greg Kroah-Hartman [Thu, 3 Sep 2009 18:58:09 +0000 (11:58 -0700)]
Staging: remove at76_usb wireless driver.

There is already an in-kernel driver for this hardware (since 2.6.30),
at76c50x-usb, and it supports all of the same devices.  So this driver
can now be deleted.

Acked-by: Kalle Valo <kalle.valo@iki.fi>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rspiusb: remove the driver
Greg Kroah-Hartman [Thu, 3 Sep 2009 04:33:06 +0000 (21:33 -0700)]
Staging: rspiusb: remove the driver

No one cares, it's a custom userspace interface, and the code hasn't
built in a long time.  So remove it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: meilhaus: remove the drivers
Greg Kroah-Hartman [Thu, 3 Sep 2009 04:29:37 +0000 (21:29 -0700)]
Staging: meilhaus: remove the drivers

The comedi drivers should be used instead, no need to have
these in here as well.

Cc: David Kiliani <mail@davidkiliani.de>
Cc: Meilhaus Support <support@meilhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: remove me4000 driver.
Greg Kroah-Hartman [Thu, 3 Sep 2009 04:27:08 +0000 (21:27 -0700)]
Staging: remove me4000 driver.

The comedi drivers should be used instead, no need to have
this driver in the tree duplicating that one.

Cc: Wolfgang Beiter <w.beiter@aon.at>
Cc: Guenter Gebhardt <g.gebhardt@meilhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: line6: ffzb returns an unsigned integer
Frederik Deweerdt [Mon, 14 Sep 2009 08:52:37 +0000 (08:52 +0000)]
Staging: line6: ffzb returns an unsigned integer

find_first_zero_bit returns a positive value, use it accordingly.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: line6: pod.c: style cleanups
Frederik Deweerdt [Mon, 14 Sep 2009 08:51:38 +0000 (08:51 +0000)]
Staging: line6: pod.c: style cleanups

Line6 pod.c: Minor style cleanups

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: iio: introduce missing kfree
Julia Lawall [Fri, 11 Sep 2009 16:22:27 +0000 (18:22 +0200)]
Staging: iio: introduce missing kfree

Error handling code following a kmalloc or kzalloc should free the
allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
15 years agoStaging: dream: introduce missing kfree
Julia Lawall [Fri, 11 Sep 2009 16:22:27 +0000 (18:22 +0200)]
Staging: dream: introduce missing kfree

Error handling code following a kmalloc or kzalloc should free the
allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
15 years agoStaging: comedi: addi-data: NULL dereference of amcc in v_pci_card_list_init()
Roel Kluin [Mon, 31 Aug 2009 08:54:37 +0000 (10:54 +0200)]
Staging: comedi: addi-data: NULL dereference of amcc in v_pci_card_list_init()

amcc allocation may fail, prevent a NULL dereference.

allocation may fail, prevent a dereference.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: vt665x: fix built-in compiling
Alexander Beregalov [Thu, 3 Sep 2009 16:38:14 +0000 (20:38 +0400)]
Staging: vt665x: fix built-in compiling

Fix this build error:
undefined reference to "__this_module"

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt3090: enable NATIVE_WPA_SUPPLICANT_SUPPORT option
Bartlomiej Zolnierkiewicz [Tue, 8 Sep 2009 20:35:41 +0000 (22:35 +0200)]
Staging: rt3090: enable NATIVE_WPA_SUPPLICANT_SUPPORT option

Similarly as it has been done in other in-kernel Ralink drivers
and in openSUSE's rt3090sta package.

Cc: Axel Koellhofer <rain_maker@root-forum.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt3090: port changes in WPA_MIX_PAIR_CIPHER to rt3090
Axel K [Thu, 3 Sep 2009 20:04:59 +0000 (22:04 +0200)]
Staging: rt3090: port changes in WPA_MIX_PAIR_CIPHER to rt3090

This patch ports a change recently applied to rt2860/rt2870 in order to
change handling of WPA1/WPA2 mixed mode to rt3090.

Signed-off-by: Axel Koellhofer <rain_maker@root-forum.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt3090: rename device from raX to wlanX
Axel K [Thu, 3 Sep 2009 19:53:37 +0000 (21:53 +0200)]
Staging: rt3090: rename device from raX to wlanX

This patch sets "wlan" as the default suffix for naming the device, a
change which has also been previously applied to rt2860/rt2870 in
staging.

Signed-off-by: Axel Koellhofer <rain_maker@root-forum.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt3090: remove possible conflict with rt2860
Axel K [Thu, 3 Sep 2009 19:24:19 +0000 (21:24 +0200)]
Staging: rt3090: remove possible conflict with rt2860

Both drivers (rt2860 and rt3090) register themselves as "rt2860" on
loading the module.

In the very rare case of somebody having two cards in his machine, one
using rt3090 and the other one using the rt2860 driver, loading both
modules would be impossible, the second one will not be loaded as the
kernel will tell you that the driver is already registered.

This was also present with rt2870/rt3070 (with both driver registering
as "rt2870"), but the code has been merged to one driver recently.

The follwoing patch fixes this potential problem until merging of
rt2860/rt3090 code to a single driver.

Signed-off-by: Axel Koellhofer <rain_maker@root-forum.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860/rt2870/rt3070/rt3090: fix compiler warning on x86_64
Axel K [Thu, 3 Sep 2009 19:13:56 +0000 (21:13 +0200)]
Staging: rt2860/rt2870/rt3070/rt3090: fix compiler warning on x86_64

When compiling rt2860/rt2870/rt3070 or rt3090 on x86_64, the following warning
is displayed:

drivers/staging/rt3090/rt_linux.c: In function 'duplicate_pkt':
drivers/staging/rt3090/rt_linux.c:531: warning: passing argument 1 of 'memmove' makes pointer from integer without a cast
include2/asm/string_64.h:58: note: expected 'void *' but argument is of type 'sk_buff_data_t'
drivers/staging/rt3090/rt_linux.c:533: warning: passing argument 1 of 'memmove' makes pointer from integer without a cast
include2/asm/string_64.h:58: note: expected 'void *' but argument is of type 'sk_buff_data_t'

The following patch fixes this warning.

Credits go to Helmut Schaa <hschaa@suse.de> for his kind advice/help on this
patch.

Signed-off-by: Axel Koellhofer <rain_maker@root-forum.org>
Cc: Helmut Schaa <hschaa@suse.de>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: add new device ids
Axel K [Thu, 3 Sep 2009 18:53:36 +0000 (20:53 +0200)]
Staging: rt2860: add new device ids

This patch adds new device IDs to ralink rt2860 driver in linux staging. The
device IDs were retrieved from the latest vendor release (version 2.1.2.0).

Signed-off-by: Axel Koellhofer <rain_maker@root-forum.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt3090: add device id 1462:891a
Axel K [Thu, 3 Sep 2009 18:47:11 +0000 (20:47 +0200)]
Staging: rt3090: add device id 1462:891a

This patch adds a new device ID (1462:819a) to ralink rt3090 driver in linux
staging. The device ID was retrieved from the latest vendor release (version
2.2.0.0).

Signed-off-by: Axel Koellhofer <rain_maker@root-forum.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: asus_oled: Cleaned up checkpatch issues.
Kevin A. Granade [Sat, 5 Sep 2009 06:03:39 +0000 (01:03 -0500)]
Staging: asus_oled: Cleaned up checkpatch issues.

Signed-off-by: Kevin A. Granade <kevin.granade@gmail.com>
Cc: Belisko Marek <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: fix possible NULL dereferences
Roel Kluin [Mon, 31 Aug 2009 10:26:43 +0000 (12:26 +0200)]
Staging: rt2860: fix possible NULL dereferences

Allocations may fail, prevent NULL dereferences.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: Drop unnecessary NULL test
Julia Lawall [Mon, 31 Aug 2009 19:34:25 +0000 (21:34 +0200)]
Staging: rtl8192e: Drop unnecessary NULL test

The result of container_of should not be NULL.  In particular, in this case
the argument to the enclosing function has passed though INIT_WORK, which
dereferences it, implying that its container cannot be NULL.

A simplified version of the semantic patch that makes this change is as
follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
identifier fn,work,x,fld;
type T;
expression E1,E2;
statement S;
@@

static fn(struct work_struct *work) {
  ... when != work = E1
  x = container_of(work,T,fld)
  ... when != x = E2
- if (x == NULL) S
  ...
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: vt665x: rename the module binary
Greg Kroah-Hartman [Fri, 11 Sep 2009 21:20:21 +0000 (14:20 -0700)]
Staging: vt665x: rename the module binary

So it doesn't conflict with a mainline kernel driver
currently under development.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: cowloop: remove kernel version checks
Greg Kroah-Hartman [Tue, 25 Aug 2009 23:26:56 +0000 (16:26 -0700)]
Staging: cowloop: remove kernel version checks

Now that the code is in the kernel tree, remove the unneeded version
checks.

Cc: "H.J. Thomassen" <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: add cowloop to the build
Greg Kroah-Hartman [Tue, 25 Aug 2009 23:00:48 +0000 (16:00 -0700)]
Staging: add cowloop to the build

Now that the code can build, let's add it to the build system.

Cc: "H.J. Thomassen" <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: cowloop: add TODO file
Greg Kroah-Hartman [Tue, 25 Aug 2009 23:04:46 +0000 (16:04 -0700)]
Staging: cowloop: add TODO file

Add a TODO file with a few things that needs to be fixed up.

Cc: "H.J. Thomassen" <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: get cowloop to build properly
Greg Kroah-Hartman [Tue, 25 Aug 2009 23:01:33 +0000 (16:01 -0700)]
Staging: get cowloop to build properly

There has been some block api changes since the last
release of the cowloop code.  This patch updates the code to
properly build.

Cc: "H.J. Thomassen" <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: add cowloop driver
H.J. Thomassen [Tue, 25 Aug 2009 22:39:04 +0000 (15:39 -0700)]
Staging: add cowloop driver

Cowloop is a "copy-on-write" pseudo block driver. It can
be stacked on top of a "real" block driver, and catches
all write operations on their way from the file systems
layer above to the real driver below, effectively shielding
the lower driver from those write accesses. The requests are
then diverted to an ordinary file, located somewhere else
(configurable). Later read requests are checked to see whether
they can be serviced by the "real" block driver below, or
must be pulled in from the diverted location. More information
is on the project's website http://www.ATComputing.nl/cowloop/

From: "H.J. Thomassen" <hjt@ATComputing.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: fix timeouts on firmware download
Greg Kroah-Hartman [Mon, 24 Aug 2009 21:40:50 +0000 (14:40 -0700)]
Staging: rtl8192e: fix timeouts on firmware download

We need to actually wait a specific ammount of time, not just hope that
a set number of loops will be long enough.

Based on a conversation with Ralink, and a proposed patch for their
older kernel driver.

Cc: david woo <xinhua_wu@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: fix for stack bug
Greg Kroah-Hartman [Thu, 20 Aug 2009 13:14:22 +0000 (06:14 -0700)]
Staging: rtl8192e: fix for stack bug

This should be a fix for the lockup bug when attaching to an access
point.

Patch came from a diff from RealTek.  Hopefully it resolves the issue.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove annoying printk()
Greg Kroah-Hartman [Fri, 14 Aug 2009 23:11:28 +0000 (16:11 -0700)]
Staging: rtl8192e: remove annoying printk()

This message doesn't need to be constantly sent to the syslog,
it's nothing but annoying gibberish.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove unneeded ieee80211 files
Greg Kroah-Hartman [Wed, 12 Aug 2009 23:50:57 +0000 (16:50 -0700)]
Staging: rtl8192e: remove unneeded ieee80211 files

These files are not even built or used, so just remove them.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: coding style cleanups on r819xE_firmware.c
Greg Kroah-Hartman [Wed, 12 Aug 2009 23:39:54 +0000 (16:39 -0700)]
Staging: rtl8192e: coding style cleanups on r819xE_firmware.c

This cleans up everything but a few 80 column issues in the
r819xE_firmware.c file.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove another firmware header file not being used
Greg Kroah-Hartman [Wed, 12 Aug 2009 23:37:49 +0000 (16:37 -0700)]
Staging: rtl8192e: remove another firmware header file not being used

The built-in firmware images are never used, the firmware files
are downloaded to the device through the standard firmware interface.

This removes the firmware header file as it's not ever used.
It also removes a .h file as it is not needed.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove firmware header file not being used
Greg Kroah-Hartman [Wed, 12 Aug 2009 23:37:49 +0000 (16:37 -0700)]
Staging: rtl8192e: remove firmware header file not being used

This removes the r819xP firmware file that is never used.

The size of the built code after this patch is identical to before it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove kernel version checks
Greg Kroah-Hartman [Wed, 12 Aug 2009 23:37:26 +0000 (16:37 -0700)]
Staging: rtl8192e: remove kernel version checks

This removes a lot of code that is never built in to the driver.

The size of the built code after this patch is identical to before it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove #if 0 sections
Greg Kroah-Hartman [Wed, 12 Aug 2009 23:36:38 +0000 (16:36 -0700)]
Staging: rtl8192e: remove #if 0 sections

This removes a lot of code that is never built in to the driver.

The size of the built code after this patch is identical to before it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: compile fixes
Jeff Mahoney [Tue, 4 Aug 2009 14:26:19 +0000 (10:26 -0400)]
Staging: rtl8192e: compile fixes

This patch removes -fhard-float and the software float helpers. In-kernel
floating point is not allowed.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: remove unused functions
Greg Kroah-Hartman [Mon, 10 Aug 2009 23:33:53 +0000 (16:33 -0700)]
Staging: rtl8192e: remove unused functions

This removes a number of unused functions.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8192e: fix lots of sparse warnings
Greg Kroah-Hartman [Mon, 10 Aug 2009 23:34:22 +0000 (16:34 -0700)]
Staging: rtl8192e: fix lots of sparse warnings

This removes a number of static and extern warnings that sparse
complains about.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: add Realtek 8192 PCI wireless driver
Greg Kroah-Hartman [Tue, 4 Aug 2009 22:57:55 +0000 (15:57 -0700)]
Staging: add Realtek 8192 PCI wireless driver

This wireless driver should work for the Realtek 8192 PCI devices.

It comes directly from Realtek and has been tested to work on at least
one laptop in the wild.

Cc: Anthony Wong <awong1@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: sync with the development tree
Evgeniy Polyakov [Fri, 28 Aug 2009 13:57:58 +0000 (17:57 +0400)]
Staging: pohmelfs: sync with the development tree

* cache coherency protocol fix
 * proper timeout handling
 * implement dump/del all config group command
  (Signed-off-by: Pierpaolo Giacomin <yrz@anche.no>)

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: remove flush_workqueue()
Alexander Beregalov [Tue, 25 Aug 2009 13:25:44 +0000 (17:25 +0400)]
Staging: agnx: remove flush_workqueue()

mac80211 already does flush_workqueue() at stop/start and
suspend\resume.
(fix build error)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: apci3200: fix test of ui_DelayTime range in i_APCI3200_CommandTestAn...
Roel Kluin [Tue, 25 Aug 2009 13:19:27 +0000 (15:19 +0200)]
Staging: comedi: apci3200: fix test of ui_DelayTime range in i_APCI3200_CommandTestAnalogInput()

For ui_DelayTime to be less than 1 and greater than 1023 is logically
impossible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rspiusb: Check usb_buffer_map_sg() retval
Roel Kluin [Sat, 22 Aug 2009 17:32:44 +0000 (19:32 +0200)]
Staging: rspiusb: Check usb_buffer_map_sg() retval

usb_buffer_map_sg() may return -1, check this directly.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Reviewed-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: panel: Add support for TI CLCD interface
Sudhakar Rajashekhara [Thu, 20 Aug 2009 22:13:18 +0000 (18:13 -0400)]
Staging: panel: Add support for TI CLCD interface

On TI DA850/OMAP-L138 EVM, HD44780 (24x2) LCD panel is being
used[1], but it is interfaced through the SoC specific LCD
interface and not through parallel port. A parallel port
driver has been developed which interfaces to the panel driver
through the SoC specific LCD interface.

Basically, both the serial and parallel interfaces supported
by the panel driver do not suit the specific interface SoC is
supporting so, a new interface type has been introduced.

Ideally the panel driver should be de-coupled from parallel
and serial port related items but this patch is something
that can be merged in the meantime.

[1]Specification of the character LCD interface on TI DA850/OMAP-L138:
http://www.ti.com/litv/pdf/sprufm0a.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: et131x: kill off the TXDMA CSR type
Alan Cox [Thu, 27 Aug 2009 10:03:38 +0000 (11:03 +0100)]
Staging: et131x: kill off the TXDMA CSR type

Go to a u32 and masks

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>