]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
12 years agostaging: tidspbridge: fix bridge_open memory leaks
Omar Ramirez Luna [Tue, 31 Jan 2012 01:20:17 +0000 (19:20 -0600)]
staging: tidspbridge: fix bridge_open memory leaks

There are two members of pr_ctxt allocated during bridge_open that
are never freed resulting in memory leaks, these are stream_id and
node_id, they are now freed on release of the handle (bridge_release)
right before freeing pr_ctxt.

Error path for bridge_open was also fixed since the same variables
could result in memory leaking due to missing handling of failure
scenarios. While at it, the indentation changes were introduced to
avoid interleaved goto statements inside big if blocks.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Move directives for the preprocessor statement to enum value in led_con...
Kevin McKinney [Mon, 13 Feb 2012 03:24:53 +0000 (22:24 -0500)]
Staging: bcm: Move directives for the preprocessor statement to enum value in led_control.h

DRIVER_HALT is a driver state that was originally
defined as a #define statement. This patch moves
it to the LedEvents type as an enumerated
value for the purpose of removing a compile time warning:

drivers/staging/bcm/led_control.c: In function ‘LEDControlThread’:
drivers/staging/bcm/led_control.c:817:3: warning: case value ‘255’ not in enumerated type ‘LedEventInfo_t’ [-Wswitch]

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zram: Rename module parameter
Nitin Gupta [Mon, 13 Feb 2012 04:04:45 +0000 (23:04 -0500)]
staging: zram: Rename module parameter

zram accepts number of devices to be created
as a module parameter. This was renamed from
num_devices to zram_num_devices (without updating
the documentation!) since num_devices was declared
as a non-static global variable, polluting the global
namespace. Now, we declare it as a static variable
and revert back the name change.

The documentation (zram.txt) already mentions
num_devices as the module parameter name.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Add event monitor example application
Lars-Peter Clausen [Mon, 13 Feb 2012 09:25:34 +0000 (10:25 +0100)]
staging:iio: Add event monitor example application

Add a small evtest like application to monitor events generated by an IIO
device. The application can be used as an example on how to listen for IIO
events and also is usful for testing and debugging device drivers which
generate IIO events.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Add missing event code extract macros
Lars-Peter Clausen [Mon, 13 Feb 2012 09:25:33 +0000 (10:25 +0100)]
staging:iio: Add missing event code extract macros

Add macros for extracting whether the event is for a differential channel and
the second channel number from the event code. These were the only two fields
which did not have such an macro yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Rename IIO_EVENT_CODE_EXTRACT_NUM to IIO_EVENT_CODE_EXTRACT_CHAN
Lars-Peter Clausen [Mon, 13 Feb 2012 09:25:32 +0000 (10:25 +0100)]
staging:iio: Rename IIO_EVENT_CODE_EXTRACT_NUM to IIO_EVENT_CODE_EXTRACT_CHAN

We name this field "chan" throughout IIO with the exception of this one macro.
Rename it to be more consistent.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:events: Remove obsolete documentation
Lars-Peter Clausen [Mon, 13 Feb 2012 09:25:31 +0000 (10:25 +0100)]
staging:iio:events: Remove obsolete documentation

Commit 43ba1100 ("staging:iio:events: Use waitqueue lock to protect event
queue") removed the event_list_lock field from the iio_event_interface struct,
but missed to remove the same field from the documentation for that function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: sm7xx: smtcfb.h: fix sparse error
Josenivaldo Benito Jr [Sun, 12 Feb 2012 21:03:15 +0000 (19:03 -0200)]
Staging: sm7xx: smtcfb.h: fix sparse error

Declaration between .h and .c was mismatched. Matched both declara
tions avoiding an sparse check error.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: sm7xx: smtcfb.c: fixed a pointer declaration coding style
Josenivaldo Benito Jr [Sun, 12 Feb 2012 21:03:14 +0000 (19:03 -0200)]
Staging: sm7xx: smtcfb.c: fixed a pointer declaration coding style

Fixed a pointer declaration coding style issue. *foo not * foo

Signed-off-by: Josenivaldo Benito Jr. <jrbenito@benito.qsl.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dac: Fix kcalloc parameters swapped
Axel Lin [Sat, 11 Feb 2012 01:00:48 +0000 (09:00 +0800)]
staging:iio:dac: Fix kcalloc parameters swapped

The first parameter should be "number of elements" and the second parameter
should be "element size".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Fix compilation warning on 64 bit arch
Szymon Janc [Fri, 10 Feb 2012 20:05:43 +0000 (21:05 +0100)]
Staging: quickstart: Fix compilation warning on 64 bit arch

acpi_size is u32 or u64 depending on architecture. Cast it to
unsigned long and use %lu for printing.

This fix following build warning:
drivers/staging/quickstart/quickstart.c: In function ‘quickstart_acpi_ghid’:
drivers/staging/quickstart/quickstart.c:212:5: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘acpi_size’ [-Wformat]

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Bump driver version to 1.04
Szymon Janc [Fri, 10 Feb 2012 20:05:44 +0000 (21:05 +0100)]
Staging: quickstart: Bump driver version to 1.04

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Use scnprintf in quickstart_pressed_button_show
Szymon Janc [Fri, 10 Feb 2012 20:05:42 +0000 (21:05 +0100)]
Staging: quickstart: Use scnprintf in quickstart_pressed_button_show

Use scnprintf instead of snprintf in quickstart_pressed_button_show as
suggested in Documentation/filesystems/sysfs.txt.

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android, lowmemorykiller: convert to use oom_score_adj
David Rientjes [Tue, 14 Feb 2012 03:28:49 +0000 (19:28 -0800)]
staging: android, lowmemorykiller: convert to use oom_score_adj

/proc/pid/oom_adj is deprecated and will be removed in August 2012
according to Documentation/feature-removal-schedule.txt.  Convert its
usage in the lowmemorykiller to use the new interface, oom_score_adj,
instead.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: Fix SEP build
Alan Cox [Mon, 13 Feb 2012 22:37:20 +0000 (22:37 +0000)]
staging: Fix SEP build

SEP build fails if crypto is not selected.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Move the storage driver out of the staging area
K. Y. Srinivasan [Thu, 9 Feb 2012 22:14:48 +0000 (14:14 -0800)]
Staging: hv: storvsc: Move the storage driver out of the staging area

The storage driver (storvsc_drv.c) handles all block storage devices
assigned to Linux guests hosted on Hyper-V. This driver has been in the
staging tree for a while and this patch moves it out of the staging area.

James was willing to apply this patch during the 3.3-rc phase and a decision
was taken to defer this to 3.4 since Greg had queued up a bunch of storvsc
patches for 3.4. Now that Greg has applied all of the pending storvsc patches,
I am sending this patch to move this driver out of staging. Based on James'
recommendation, this patch gets rid of the unneeded files in the staging/hv
directory.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: fix powerpc linux-next break on zsmalloc
Seth Jennings [Mon, 13 Feb 2012 14:47:49 +0000 (08:47 -0600)]
staging: fix powerpc linux-next break on zsmalloc

linux/vmalloc.h added to zsmalloc-main.c to resolve implicit
declaration errors.

X86 dependency added to zsmalloc and dependent drivers zcache and zram.

This X86 only requirement is not ideal.  Working to find portable
functions for __flush_tlb_one and set_pte.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge tag 'staging-3.3-rc3' into staging-next
Greg Kroah-Hartman [Fri, 10 Feb 2012 18:58:25 +0000 (10:58 -0800)]
Merge tag 'staging-3.3-rc3' into staging-next

This was done to resolve some merge issues with the following files that
had changed in both branches:
drivers/staging/rtl8712/rtl871x_sta_mgt.c
drivers/staging/tidspbridge/rmgr/drv_interface.c
drivers/staging/zcache/zcache-main.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: reworked crypto layer
Mark A. Allyn [Fri, 10 Feb 2012 13:53:36 +0000 (13:53 +0000)]
staging: sep: reworked crypto layer

This gets the SEP crypto layer up and running with things like dmcrypt.
It's a fairly big set of changes because it has to rework the whole context
handling system.

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: NULL out pointers, mark debug code DEBUG to fix warnings
Mark A. Allyn [Fri, 10 Feb 2012 13:53:21 +0000 (13:53 +0000)]
staging: sep: NULL out pointers, mark debug code DEBUG to fix warnings

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: update initialisation
Mark A. Allyn [Fri, 10 Feb 2012 13:53:08 +0000 (13:53 +0000)]
staging: sep: update initialisation

In particular we want to always do the reconfigure

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: Add interfaces for the new functions
Mark A. Allyn [Fri, 10 Feb 2012 13:52:55 +0000 (13:52 +0000)]
staging: sep: Add interfaces for the new functions

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: Basic infrastructure for SEP DMA access to non CPU regions
Mark A. Allyn [Fri, 10 Feb 2012 13:52:42 +0000 (13:52 +0000)]
staging: sep: Basic infrastructure for SEP DMA access to non CPU regions

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep: Add new PCI identifier
Mark A. Allyn [Fri, 10 Feb 2012 13:52:27 +0000 (13:52 +0000)]
staging: sep: Add new PCI identifier

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Support old drivers via preprocessor aliasing
John Stultz [Thu, 9 Feb 2012 22:24:41 +0000 (14:24 -0800)]
staging: android-alarm: Support old drivers via preprocessor aliasing

Older out of tree drivers that were desgined to the Android Alarm
in-kernel API may not build due to the namespace collision fixed in
an earlier patch. Per Arve's suggestion, this patch provides
preprocessor macros that allow older drivers to build.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Fixup minor pr_alarm warnings
John Stultz [Thu, 9 Feb 2012 22:24:40 +0000 (14:24 -0800)]
staging: android-alarm: Fixup minor pr_alarm warnings

This patch fixes the following warnings:

drivers/staging/android/alarm.c: In function ‘alarm_timer_triggered’:
drivers/staging/android/alarm.c:344: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
drivers/staging/android/alarm.c:367: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Fix bad index when canceling alarms[]
JP Abgrall [Thu, 9 Feb 2012 22:24:39 +0000 (14:24 -0800)]
staging: android-alarm: Fix bad index when canceling alarms[]

It was using ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK as an
index.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
CC: JP Abgrall <jpa@google.com>
Change-Id: I919860cc71254453e382616bce9fd5455802cb3d
Signed-off-by: JP Abgrall <jpa@google.com>
[jstultz: Tweaked commit subject]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Update hrtimer if alarm at the head of the queue is reprogrammed
Arve Hjønnevåg [Thu, 9 Feb 2012 22:24:38 +0000 (14:24 -0800)]
staging: android-alarm: Update hrtimer if alarm at the head of the queue is reprogrammed

If an alarm was restarted with a value that moved it away from the head
of a queue, the hrtimer would not be updated. This would cause unnecessary
wakeups.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Change-Id: If379f8dd92b0bdb3173bd8d057adfe0dc1d15259
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Disable Android alarm driver by default
Praneeth Kumar Bajjuri [Thu, 9 Feb 2012 22:24:37 +0000 (14:24 -0800)]
staging: android-alarm: Disable Android alarm driver by default

Do not enable Android alarm driver by default

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
CC: Praneeth Bajjuri <praneeth@ti.com>
Change-Id: Iff8f7a65c4eceecfd084074937c72824697b5e7f
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
[jstultz: tweaked commit subject & msg]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Reenable android alarm driver
John Stultz [Thu, 9 Feb 2012 22:24:36 +0000 (14:24 -0800)]
staging: android-alarm: Reenable android alarm driver

Now that it builds, re-enable android alarm driver in
the makefile and kconfig

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: HACK: wakelock workaround
John Stultz [Thu, 9 Feb 2012 22:24:35 +0000 (14:24 -0800)]
staging: android-alarm: HACK: wakelock workaround

Allow Android alarmtimer device to build while wakelocks are still
out of tree.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Fix namespace collision with upstreamed alarmtimers
John Stultz [Thu, 9 Feb 2012 22:24:34 +0000 (14:24 -0800)]
staging: android-alarm: Fix namespace collision with upstreamed alarmtimers

The upstreamed alarmtimers are similar but not quite 100% API
compatibile with the android in-kernel alarm api. To aid the
transition, prefix the the android in-kernel api with android_

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Fix include compile issues
John Stultz [Thu, 9 Feb 2012 22:24:33 +0000 (14:24 -0800)]
staging: android-alarm: Fix include compile issues

The file asm/mach/time.h doesn't exist on all arches,
so include <linux/time.h>. Also linux/sysdev.h is gone
so kill it.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Add needed module.h includes
Andy Green [Thu, 9 Feb 2012 22:24:32 +0000 (14:24 -0800)]
staging: android-alarm: Add needed module.h includes

Add module.h includes required to build

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
CC: Andy Green <andy.green@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
[jstultz: Tweaked commit subject, folded two patches
into one]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Don't use save_time_delta.
Arve Hjønnevåg [Thu, 9 Feb 2012 22:24:31 +0000 (14:24 -0800)]
staging: android-alarm: Don't use save_time_delta.

Remove references to non-existant save_time_delta.

Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53
CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
[Added commit message -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Add android alarm driver & in-kernel alarm interface
Arve Hjønnevåg [Thu, 9 Feb 2012 22:24:30 +0000 (14:24 -0800)]
staging: android-alarm: Add android alarm driver & in-kernel alarm interface

Drivers can now create alarms that will use an hrtimer while the
system is running and the rtc to wake up from suspend.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
[Fold and move alarm driver and interface to staging,
 fix whitespace issue, drop kconfig & make file changes
 as it currently doesn't build  -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: fix CodingStyle warnings/errors reported by checkpatch.pl in led_control.h
Gerard Ryan [Fri, 10 Feb 2012 01:54:50 +0000 (01:54 +0000)]
Staging: bcm: fix CodingStyle warnings/errors reported by checkpatch.pl in led_control.h

This is a patch to the led_control.h file that fixes numerous warnings
and errors reported by the checkpatch.pl tool. There still remain a few
more, but as this is my first attempt at a commit, I'm not going to be
too adventurous!

Signed-off-by: Gerard Ryan <gerard@ryan.lt>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: r8712u: Add missing initialization and remove configuration parameter CONFIG...
Larry Finger [Thu, 9 Feb 2012 22:37:17 +0000 (16:37 -0600)]
staging: r8712u: Add missing initialization and remove configuration parameter CONFIG_R8712_AP

When this driver was upgraded to the vendor 20100831 version in
commit 93c55dda092c7 et al,, one listhead initialization was missed.
This broke complete operation of the driver whenever AP mode was
enabled. This fixes https://bugs.archlinux.org/task/27996.

The configuration parameter R8712_AP is misleading as the driver cannot
function as an AP without a heavily hacked version of hostapd. Thus, it
makes sense to remove the parameter; however the code and data configured
for the option is left in.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: remove remaining duplicate initdef.h defines
Peter Huewe [Thu, 9 Feb 2012 20:11:49 +0000 (21:11 +0100)]
staging/xgifb: remove remaining duplicate initdef.h defines

This patch removes the remaining defines that are already defined
identically in the sis initdef.h header.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: Use TVCLKBASE_315 as a base address
Peter Huewe [Thu, 9 Feb 2012 20:11:48 +0000 (21:11 +0100)]
staging/xgifb: Use TVCLKBASE_315 as a base address

Since the defines TVVCLKDIV2, TVVCLK, HiTVVCLKDIV2, HiTVVCLK,
HiTVSimuVCLK and HiTVTextVCLK are now defined as relative values, we
have to use TVCLKBASE_315 (0x31) as a base address to get the same values
as before the merge.

The old and now duplicated defines were removed

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: Rename XGI specific initdef.h defines
Peter Huewe [Thu, 9 Feb 2012 20:11:47 +0000 (21:11 +0100)]
staging/xgifb: Rename XGI specific initdef.h defines

This patch renames some of the defines that exist in the sis initdef.h
but seem to have a different value.
In order to preserve the functionality of the driver, we simply prepend
these defines with XGI_ (for now) to resolve conflicts and review them
later on.

Renames:
SetCRT2ToLCDA -> XGI_SetCRT2ToLCDA
LCDVESATiming -> XGI_LCDVESATiming
EnableLVDSDDA -> XGI_EnableLVDSDDA
LCDDualLink  -> XGI_LCDDualLink
ModeSwitchStatus  -> XGI_ModeSwitchStatus
YPbPr750pVCLK  -> XGI_YPbPr750pVCLK

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: Rename remaining sis initdef.h defines and remove duplicates
Peter Huewe [Thu, 9 Feb 2012 20:11:46 +0000 (21:11 +0100)]
staging/xgifb: Rename remaining sis initdef.h defines and remove duplicates

This patch renames the remaining duplicate defines and their usage to
the naming convention of the sis initdef.h and removes the now duplicated
defines.

Renames:
CRT2DisplayFlag -> DisableCRT2Display
ModeInfoFlag -> ModeTypeMask

Support16Bpp -> Mode16Bpp
Support32Bpp -> Mode32Bpp

SupportHiVisionTV -> SupportHiVision
SupportYPbPr -> SupportYPbPr750p
SwitchToCRT2 -> SwitchCRT2

VB_XGI301 -> VB_SIS301
VB_XGI301B -> VB_SIS301B
VB_XGI301LV -> VB_SIS301LV
VB_XGI302B -> VB_SIS302B
VB_XGI302LV -> VB_SIS302LV
VB_YPbPr525p -> YPbPr525p
VB_YPbPr750p -> YPbPr750p

VCLK108_2 -> VCLK108_2_315
VCLK65 -> VCLK65_315

XGI_CRT2_PORT_04 -> SIS_CRT2_PORT_04
XGI_CRT2_PORT_10 -> SIS_CRT2_PORT_10
XGI_CRT2_PORT_12 -> SIS_CRT2_PORT_12
XGI_CRT2_PORT_14 -> SIS_CRT2_PORT_14

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: Rename Set* defines and remove duplicated defines
Peter Huewe [Thu, 9 Feb 2012 20:11:45 +0000 (21:11 +0100)]
staging/xgifb: Rename Set* defines and remove duplicated defines

This patch renames the Set* defines and their usage to the naming
convention of the sis initdef.h and removes the now duplicated defines.

Renames:
SetCRT2ToHiVisionTV -> SetCRT2ToHiVision
SetCRT2ToYPbPr -> SetCRT2ToYPbPr525750

SetNTSCJ -> TVSetNTSCJ
SetPALMTV -> TVSetPALM
SetPALNTV -> TVSetPALN
SetPALTV -> TVSetPAL

SetYPbPrMode1080i -> TVSetHiVision
SetYPbPrMode525i -> TVSetYPbPr525i
SetYPbPrMode525p -> TVSetYPbPr525p
SetYPbPrMode750p -> TVSetYPbPr750p

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: Rename panel defines and remove duplicated defines
Peter Huewe [Thu, 9 Feb 2012 20:11:44 +0000 (21:11 +0100)]
staging/xgifb: Rename panel defines and remove duplicated defines

This patch renames the Panel* defines and their usage to the naming
convention of the sis initdef.h and removes the now duplicated defines.

Renames:
Panel320x480 -> Panel_320x480
Panel800x600 -> Panel_800x600
Panel1024x768 -> Panel_1024x768
Panel1024x768x75 -> Panel_1024x768x75
Panel1280x1024 -> Panel_1280x1024
Panel1280x1024x75 -> Panel_1280x1024x75
Panel1280x960 -> Panel_1280x960
Panel1400x1050 -> Panel_1400x1050
Panel1600x1200 -> Panel_1600x1200

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/xgifb: Include sis initdef.h header
Peter Huewe [Thu, 9 Feb 2012 20:11:43 +0000 (21:11 +0100)]
staging/xgifb: Include sis initdef.h header

This patch includes the initdef.h header from the sis driver.
Since the xgi driver used to redefine a lot of stuff from the sis
driver, we can simply include the headers of the sis driver itself, so
we can remove duplicated stuff later on.

In order to include the initdef.h we have to rename the header guards.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: delete the driver
Greg Kroah-Hartman [Fri, 10 Feb 2012 17:45:22 +0000 (09:45 -0800)]
staging: ramster: delete the driver

Turns out it's not quite ready to be included, thanks to some other work
done in the zcache and zram code, which breaks this driver.

So, delete it for now, per the recommendation of Dan.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge tag 'staging-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 9 Feb 2012 21:52:18 +0000 (13:52 -0800)]
Merge tag 'staging-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Staging tree patches for 3.3-rc3

Big things here is the deletion of the Android pmem driver, as it's
obsolete and no one uses it, the gma500 driver as it's already in the
drm portion of the kernel tree, and the pohmelfs filesystem as it's
obsolete and a rewritten version is being proposed for the fs/ section
of the kernel.

Other than that, a smattering of different bugfixes and regressions, and
some omap drm api merge fixups that were needed due to api changes in
the main portion of the drm tree, allowing this code to build properly
again.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'staging-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits)
  staging: pohmelfs: remove drivers/staging/pohmelfs
  staging: android/ram_console: Don't build on arches w/o ioremap
  staging: r8712u: Use asynchronous firmware loading
  staging: usbip: fix to prevent potentially using uninitialized spinlock
  staging: r8712u: Fix problem when CONFIG_R8712_AP is set
  staging: tidspbridge: fix incorrect free to drv_datap
  staging: tidspbridge: fix bridge_open memory leaks
  staging: android: lowmemorykiller: Don't wait more than one second for a process to die
  MAINTAINERS: staging: iio: add iio information
  staging: zcache: fix serialization bug in zv stats
  staging: fix go7007-usb license
  Staging: android: binder: Fix crashes when sharing a binder file between processes
  Staging: android: Remove pmem driver
  Staging: asus_oled: fix NULL-ptr crash on unloading
  Staging: asus_oled: fix image processing
  Staging: android: binder: Don't call dump_stack in binder_vma_open
  staging: r8712u: Add new Sitecom UsB ID
  zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention.
  zcache: fix deadlock condition
  staging: drm/omap: fix locking issue
  ...

12 years agoMerge tag 'driver-core-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 9 Feb 2012 21:51:36 +0000 (13:51 -0800)]
Merge tag 'driver-core-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Driver core fixes for the 3.3-rc3 tree.

A few fixes for kobject warnings that have popped up in the cpu hotplug path,
and a regression fix for the speed of the hotplug memory code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'driver-core-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  driver-core: cpu: fix kobject warning when hotplugging a cpu
  ACPI: remove duplicated lines of merging problems with acpi_processor_add
  docbook: fix fatal errors in device-drivers docbook and add DMA Management section
  drivers/base/memory.c: fix memory_dev_init() long delay
  driver core: cpu: remove kernel warning when removing a cpu

12 years agoMerge tag 'char-misc-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 9 Feb 2012 21:51:13 +0000 (13:51 -0800)]
Merge tag 'char-misc-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Minor char-misc fixes for 3.3-rc3

Nothing big here, some Kconfig fixes for the MISC_DEVICES config option
that was being used incorrectly, and some other minor bug fixes.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'char-misc-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip
  cs5535-mfgpt: don't call __init function from __devinit
  vmw_balloon: fix for a -Wuninitialized warning
  drivers: misc: Remove MISC_DEVICES config option
  c2port: fix build error for duramar2150 due to missing header.

12 years agoMerge tag 'usb-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Thu, 9 Feb 2012 21:50:54 +0000 (13:50 -0800)]
Merge tag 'usb-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

USB fixes for 3.3-rc3

Here are a few minor USB fixes and a bunch of device id updates for the
USB drivers.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'usb-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: usbserial: add new PID number (0xa951) to the ftdi driver
  usb: ch9.h: usb_endpoint_maxp() uses __le16_to_cpu()
  usb: musb: fix a build error on mips
  uwb & wusb & usb wireless controllers: fix kconfig error & build errors
  usb: Skip PCI USB quirk handling for Netlogic XLP
  powerpc/usb: fix issue of CPU halt when missing USB PHY clock
  usb: otg: mv_otg: Add dependence
  usb: host: Distinguish Kconfig text for Freescale controllers
  USB: add new zte 3g-dongle's pid to option.c
  usb: ch9.h: usb_endpoint_maxp() uses __le16_to_cpu()
  USB: qcserial: don't enable autosuspend
  USB: qcserial: add several new serial devices
  usb: otg: mv_otg: Add dependence
  usb: gadget: zero: fix bug in loopback autoresume handling

12 years agostaging: zcache: replace xvmalloc with zsmalloc
Seth Jennings [Thu, 9 Feb 2012 18:25:03 +0000 (12:25 -0600)]
staging: zcache: replace xvmalloc with zsmalloc

Replaces xvmalloc with zsmalloc as the persistent memory allocator
for zcache

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: fix serialization bug in zv stats
Seth Jennings [Thu, 9 Feb 2012 18:25:02 +0000 (12:25 -0600)]
staging: zcache: fix serialization bug in zv stats

In a multithreaded workload, the zv_curr_dist_counts
and zv_cumul_dist_counts statistics are being corrupted
because the increments and decrements in zv_create
and zv_free are not atomic.

This patch converts these statistics and their corresponding
increments/decrements/reads to atomic operations.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoReduce the number of expensive division instructions done by _parse_integer()
David Howells [Thu, 9 Feb 2012 15:48:20 +0000 (15:48 +0000)]
Reduce the number of expensive division instructions done by _parse_integer()

_parse_integer() does one or two division instructions (which are slow)
per digit parsed to perform the overflow check.

Furthermore, these are particularly expensive examples of division
instruction as the number of clock cycles required to complete them may
go up with the position of the most significant set bit in the dividend:

if (*res > div_u64(ULLONG_MAX - val, base))

which is as maximal as possible.

Worse, on 32-bit arches, more than one of these division instructions
may be required per digit.

So, assuming we don't support a base of more than 16, skip the check if the
top nibble of the result is not set at this point.

Signed-off-by: David Howells <dhowells@redhat.com>
[ Changed it to not dereference the pointer all the time - even if the
  compiler can and does optimize it away, the code just looks cleaner.
  And edited the top nybble test slightly to make the code generated on
  x86-64 better in the loop - test against a hoisted constant instead of
  shifting and testing the result ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agostaging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs.
Jonathan Cameron [Sun, 29 Jan 2012 11:07:04 +0000 (11:07 +0000)]
staging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs.

Neither of these drivers has ever been anywhere near the iio abi.
Probably as a result of this the fact they had two event groups
each was not picked up when we restricted IIO to having only
1 event line per device (as part of the chrdev merge set).

As such these definitely didn't work before.  This patch squishes
the only element from the 'comparator' event line that isn't in the
'interrupt' one into it and kills off the 'comparator' one.

Ultimately both of these drivers belong in hwmon not IIO and are just
waiting here because I don't want to kill off a driver that may
prove useful to someone.  (Ultimately I will ask Greg to scrap
these two if no one steps up to deal with them.)

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7606 unwind use of is_visible for attrs.
Jonathan Cameron [Sun, 29 Jan 2012 11:07:03 +0000 (11:07 +0000)]
staging:iio:adc:ad7606 unwind use of is_visible for attrs.

This is the most controversial of this set of is_visible removals.
There are two conditions controlling availability of attrs resulting
in 4 different attribute groups.

Still for a few more lines things are clearer to read to my mind.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dac:ad5446 unwind use of is_visible for attrs.
Jonathan Cameron [Sun, 29 Jan 2012 11:07:02 +0000 (11:07 +0000)]
staging:iio:dac:ad5446 unwind use of is_visible for attrs.

Trivial case where no attributes are valid for some parts. Better
handled using two iio_info structures and selecting the right one
at probe time.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dds:ad9834 unwind use of is_visible for attrs.
Jonathan Cameron [Sun, 29 Jan 2012 11:07:01 +0000 (11:07 +0000)]
staging:iio:dds:ad9834 unwind use of is_visible for attrs.

Trivial usecase in which just having two different attr
groups covers all options.  Slightly more code, but a simpler
to follow result.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7192 unwind use of is_visible for attribute group.
Jonathan Cameron [Sun, 29 Jan 2012 11:07:00 +0000 (11:07 +0000)]
staging:iio:adc:ad7192 unwind use of is_visible for attribute group.

It saves a couple of lines of code but reduces simplicity of code.
I generally wish to discourage use of is_visible throughout IIO.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:events: Use non-atmoic bitops
Lars-Peter Clausen [Tue, 3 Jan 2012 13:59:42 +0000 (14:59 +0100)]
staging:iio:events: Use non-atmoic bitops

We always hold the waitqueue lock when modifying the flags field. So it is safe
to use the non-atomic bitops here instead of the atomic versions.

The lock has to be held, because we need to clear the busy flag and flush the
event FIFO in one atomic operation when closing the event file descriptor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:events: Add poll support
Lars-Peter Clausen [Tue, 3 Jan 2012 13:59:41 +0000 (14:59 +0100)]
staging:iio:events: Add poll support

Add poll support to the event queue. This will allow us to check for pending
events in a application's event loop using poll() or similar. Since we already
have support for blocking reads adding poll support as well is trivial.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:events: Use waitqueue lock to protect event queue
Lars-Peter Clausen [Tue, 3 Jan 2012 13:59:40 +0000 (14:59 +0100)]
staging:iio:events: Use waitqueue lock to protect event queue

Use the waitqueue lock to protect the event queue instead of a custom mutex.
This has the advantage that we can call the waitqueue operations with the lock
held, which simplifies the code flow a bit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:events: Use kfifo for event queue
Lars-Peter Clausen [Tue, 3 Jan 2012 13:59:39 +0000 (14:59 +0100)]
staging:iio:events: Use kfifo for event queue

The current IIO event code uses a list to emulate FIFO like behavior.
Just use a kfifo directly instead to implement the event queue. As part of this
patch the maximum of events in the queue is increased from 10 to 16 since kfifo
requires a power of two for the number of FIFO elements.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Factor out event handling into its own file
Lars-Peter Clausen [Tue, 3 Jan 2012 13:59:38 +0000 (14:59 +0100)]
staging:iio: Factor out event handling into its own file

The core iio file has gotten quite cluttered over time. This patch moves
the event handling code into its own file. Since the event handling code is
largely independent from the core code the only code changes necessary for
this are to make the moved iio_device_register_eventset,
iio_device_unregister_eventset and iio_event_getfd functions non static.

This has also the advantage that industrialio-core.c is now closer again to
its counterpart in the outofstaging branch.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Update iio_event_interface documentation
Lars-Peter Clausen [Tue, 3 Jan 2012 13:59:37 +0000 (14:59 +0100)]
staging:iio: Update iio_event_interface documentation

The documentation for the iio_event_interface does not match the actual struct
anymore. This patch removes the documentation for non-existing fields and adds
documentation for missing fields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Setup buffer access functions when allocating the buffer
Lars-Peter Clausen [Tue, 3 Jan 2012 10:02:51 +0000 (11:02 +0100)]
staging:iio: Setup buffer access functions when allocating the buffer

Setup the buffer access functions in the buffer allocate function. There is no
need to let each driver handle this on its own.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: ak8975: add of_match table for device-tree probing
Olof Johansson [Fri, 23 Dec 2011 02:46:42 +0000 (18:46 -0800)]
staging:iio: ak8975: add of_match table for device-tree probing

Just like isl29018; trivial addition. Using both asahi-kasei,ak8975 and
the non-prefixed version (I couldn't figure out if Asahi Kasei had a
stock symbol to use, I only found numerical indexes for their stock info).

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: isl29018: add of_match table for device-tree probing
Olof Johansson [Fri, 23 Dec 2011 02:44:43 +0000 (18:44 -0800)]
staging:iio: isl29018: add of_match table for device-tree probing

As simple as can be right now; just one ID and no custom properties to parse.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: comedi: logical || vs bitwise |
Dan Carpenter [Tue, 17 Jan 2012 07:31:13 +0000 (10:31 +0300)]
Staging: comedi: logical || vs bitwise |

These are bitfields and the intend was to OR them together.  A logical
OR here is simply 1.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_pcidio: Support trailing edge external trigger
Ian Abbott [Mon, 9 Jan 2012 15:47:33 +0000 (15:47 +0000)]
staging: comedi: ni_pcidio: Support trailing edge external trigger

This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

The patch adds support for trailing (falling) edge external triggers for
scans in asynchronous command support in the ni_pcidio driver.  This is
supported at least on the PCI-DIO_32HS and PCI-6533 boards; not sure
about the other boards.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nicholas Nell <nicholas.nell@colorado.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_pcidio: Add comedi_poll support
Ian Abbott [Mon, 9 Jan 2012 18:35:53 +0000 (18:35 +0000)]
staging: comedi: ni_pcidio: Add comedi_poll support

This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

The patch adds support for the COMEDI_POLL ioctl to the ni_pcidio
driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nicholas Nell <nicholas.nell@colorado.edu>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_pcidio: Grab MITE spinlock while preparing DMA.
Ian Abbott [Mon, 9 Jan 2012 15:47:31 +0000 (15:47 +0000)]
staging: comedi: ni_pcidio: Grab MITE spinlock while preparing DMA.

When setting up the DMA for 'read' streaming acquisition command, grab
the MITE channel spinlock before preparing and arming the DMA.

Change inspired by ni_ai_setup_MITE_dma() in ni_mio_common.c.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_pcidio: Mark buffer for writing when setting up DMA.
Ian Abbott [Mon, 9 Jan 2012 15:47:30 +0000 (15:47 +0000)]
staging: comedi: ni_pcidio: Mark buffer for writing when setting up DMA.

When setting up the DMA for 'read' streaming acquisition on the DIO
subdevice, mark the whole buffer as writable before starting the DMA.
This prevents a spurious detection of a DMA overwrite of good data
during the first interrupt.

Problem reported by Nicholas Nell.  Fix suggested by Frank Mori Hess.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: adv_pci_dio: Advantech PCI-1739U support
Ian Abbott [Mon, 9 Jan 2012 15:45:45 +0000 (15:45 +0000)]
staging: comedi: adv_pci_dio: Advantech PCI-1739U support

This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

-----
Advantech PCI-1739U support

Hello,

I've added a bit of simple configuration to adv_pci_dio.c in order to
make the PCI-1739U work with the adv_pci_dio driver. I have tested
inputs only so far but they seem to work. A git style patch is
attached.

Thanks,

--
Nicholas Nell
Professional Research Assistant
University of Colorado
-----

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nico Nell <nicholas.nell@colorado.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: Check for unsupported INSN_CONFIG.
Ian Abbott [Mon, 9 Jan 2012 15:48:56 +0000 (15:48 +0000)]
staging: comedi: me4000: Check for unsupported INSN_CONFIG.

The INSN_CONFIG handler for the DIO subdevice should error out for
unsupported configuration instruction codes.

Also fix incorrect use of constant COMEDI_OUTPUT where
INSN_CONFIG_DIO_OUTPUT was meant.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dt2801: do INSN_CONFIG properly for DIO subdevice.
Ian Abbott [Mon, 9 Jan 2012 15:48:35 +0000 (15:48 +0000)]
staging: comedi: dt2801: do INSN_CONFIG properly for DIO subdevice.

Handle INSN_CONFIG_DIO_INPUT, INSN_CONFIG_DIO_OUTPUT and
INSN_CONFIG_DIO_QUERY in data[0].

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_pcimio: Add support for NI PXIe-6251
Ian Abbott [Mon, 9 Jan 2012 15:48:19 +0000 (15:48 +0000)]
staging: comedi: ni_pcimio: Add support for NI PXIe-6251

Paul Fulmek reports that PXIe-6251 works the same as the existing
PCIe-6251 and just needs the new PCI device ID adding to ni_pci_table[]
and a new entry adding to ni_boards[] based on the existing entry for
PCIe-6251.

The new entry has PCI device ID 0x72e8 and board name "pxie-6251".

Thanks Paul!

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: wlan-ng: cap the ssid length
Dan Carpenter [Tue, 31 Jan 2012 08:45:15 +0000 (11:45 +0300)]
Staging: wlan-ng: cap the ssid length

We're getting the ssid length from the scan here.  Let's cap it before
doing the memcpy().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging, media, easycap: Fix mem leak in easycap_usb_probe()
Jesper Juhl [Sun, 29 Jan 2012 20:55:28 +0000 (21:55 +0100)]
staging, media, easycap: Fix mem leak in easycap_usb_probe()

If allocating 'pdata_urb' fails, the function will return -ENOMEM
without freeing the memory allocated, just a few lines above, for
'purb' and will leak that memory when 'purb' goes out of scope.

This patch resolves the leak by freeing the allocated storage with
usb_free_urb() before the return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: Fix typo in ieee80211_rx.c
Masanari Iida [Tue, 24 Jan 2012 15:35:41 +0000 (00:35 +0900)]
staging: Fix typo in ieee80211_rx.c

Correct spelling "suppported" to "supported" in
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c

Signed-off-by: Masanari iida<standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: sbe-2t3e3: logical || vs bitwise |
Dan Carpenter [Tue, 17 Jan 2012 07:31:52 +0000 (10:31 +0300)]
Staging: sbe-2t3e3: logical || vs bitwise |

Bitwise OR was clearly intended here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: TODO : how to handle example code after unstaging
Tomas Winkler [Thu, 9 Feb 2012 17:25:56 +0000 (19:25 +0200)]
staging/mei: TODO : how to handle example code after unstaging

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: add mei user space example
Tomas Winkler [Thu, 9 Feb 2012 17:25:55 +0000 (19:25 +0200)]
staging/mei: add mei user space example

this example tries to connect to amt host interface client and retrieve
versions of its sub components

When AMT is enabled an output might look like that:
Intel AMT: ENABLED
Flash: 6.1.0
Netstack: 6.1.0
AMTApps: 6.1.0
AMT: 6.1.0
Sku: 258
VendorID: 8086
Build Number: 1042
Recovery Version: 6.1.0
Recovery Build Num: 1042
Legacy Mode: False

otherwise:
Intel AMT: DISABLED

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: normalize prototypes of all read buffers
Tomas Winkler [Thu, 9 Feb 2012 17:25:54 +0000 (19:25 +0200)]
staging/mei: normalize prototypes of all read buffers

1. convert all read buffers to unsigned char and drop useless castings
2. simplify mei_read_slots implementation

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: update copyright year to 2012
Tomas Winkler [Thu, 9 Feb 2012 17:25:53 +0000 (19:25 +0200)]
staging/mei: update copyright year to 2012

1. Update Copyright to 2012
2. Also fix mei.h copyright format
   checkpaatch complained:
   WARNING: please, no spaces at the start of a line

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ft1000: ft1000-pcmia: fix space required after that ', ' in ft1000_proc.c
Kashyap Gada [Mon, 6 Feb 2012 02:01:16 +0000 (02:01 +0000)]
Staging: ft1000: ft1000-pcmia: fix space required after that ', ' in ft1000_proc.c

This is a patch to the ft1000_proc.c that fixes up space required after
',' errors found by the checkpatch.pl tool

Signed-off-by: Kashyap Gada <gada.kashyap@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: usbip: removed #if 0'd out code
Bart Westgeest [Mon, 23 Jan 2012 15:55:47 +0000 (10:55 -0500)]
staging: usbip: removed #if 0'd out code

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: usbip: changed function return type to void
Bart Westgeest [Mon, 23 Jan 2012 15:55:46 +0000 (10:55 -0500)]
staging: usbip: changed function return type to void

The function usbip_pad_iso never returns anything but 0 (success).

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: usbip: removed unused structure field
Bart Westgeest [Mon, 23 Jan 2012 15:55:45 +0000 (10:55 -0500)]
staging: usbip: removed unused structure field

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(..
Thomas Meyer [Sun, 22 Jan 2012 17:27:21 +0000 (18:27 +0100)]
staging: drm/omap: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(..

The semantic patch that makes this change is available
in scripts/coccinelle/api/err_cast.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rts5139: fix pointer coding style
Márton Németh [Sun, 22 Jan 2012 21:47:15 +0000 (22:47 +0100)]
staging: rts5139: fix pointer coding style

This will remove the following checkpatch.pl error:
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: edwin_rong <edwin_rong@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Use pr_err and pr_info for logs
Szymon Janc [Sun, 22 Jan 2012 18:50:13 +0000 (19:50 +0100)]
Staging: quickstart: Use pr_err and pr_info for logs

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove CONFIG_TIDSPBRIDGE_DEBUG
Víctor Manuel Jáquez Leal [Mon, 6 Feb 2012 23:39:37 +0000 (00:39 +0100)]
staging: tidspbridge: remove CONFIG_TIDSPBRIDGE_DEBUG

Since all the asserts and DBC macros are gone, the kconfig macro
CONFIG_TIDSPBRIDGE_DEBUG is not almost used, but for printing trace messages.

Since it is almost not used, I don't see any case for keep it churning the
configuration menu.

This patch removes completely the kconfig macro CONFIG_TIDSPBRIDGE_DEBUG,
using only TIDSPBRIDGE_BACKTRACE for enabling the debug trace messages.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove dbc.h
Víctor Manuel Jáquez Leal [Mon, 6 Feb 2012 23:39:36 +0000 (00:39 +0100)]
staging: tidspbridge: remove dbc.h

All the macros in dbc.h are removed now so this patch removes it completely.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove DBC_ASSERT macro
Víctor Manuel Jáquez Leal [Mon, 6 Feb 2012 23:39:35 +0000 (00:39 +0100)]
staging: tidspbridge: remove DBC_ASSERT macro

This macro is only valid when CONFIG_TIDSPBRDIGE_DEBUG is enabled and it only
prints a log message, it is not a real assertion mechanism like BUG_ON() or
WARN_ON().

It is better to remove them: less code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove DBC_ENSURE and DBC_REQUIRED
Víctor Manuel Jáquez Leal [Mon, 6 Feb 2012 23:39:34 +0000 (00:39 +0100)]
staging: tidspbridge: remove DBC_ENSURE and DBC_REQUIRED

The kernel does not use a "Design by Contract" approach, and it is only
activated in the module if CONFIG_TIDSPBRDIGE_DEBUG is enabled, so they are
executed rarely. It is better to remove them: less code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: Rename module from bridgedriver to tidspbridge
Joe Perches [Tue, 24 Jan 2012 21:25:05 +0000 (13:25 -0800)]
staging: tidspbridge: Rename module from bridgedriver to tidspbridge

tidspbridge when built as a module is named bridgedriver.

bridgedriver is not a particularly good module name.

tidspbridge is what the source is named.  That seems
a more appropriate module name too as it describes
the hardware function better.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: use the driver name string
Víctor Manuel Jáquez Leal [Mon, 30 Jan 2012 23:12:24 +0000 (00:12 +0100)]
staging: tidspbridge: use the driver name string

Instead of assign it to a global variable which is not used anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: clean up bridge_mmap()
Víctor Manuel Jáquez Leal [Mon, 30 Jan 2012 23:12:23 +0000 (00:12 +0100)]
staging: tidspbridge: clean up bridge_mmap()

The variable offset is not used but in the debug log, so I don't see reason to
calculate it here.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove trivial assert
Víctor Manuel Jáquez Leal [Mon, 30 Jan 2012 23:12:22 +0000 (00:12 +0100)]
staging: tidspbridge: remove trivial assert

The function dsp_deinit() always return true, so assert its output is
pointless. As consequence the variable were the returned value is stored, is
no longer needed.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove header inclusions
Víctor Manuel Jáquez Leal [Mon, 30 Jan 2012 23:12:21 +0000 (00:12 +0100)]
staging: tidspbridge: remove header inclusions

drv_interface.c include several header files that are not really used.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>