Changes since V1:
Added kernel-doc
Moved callback into iio_info
Changed function naming
Revised return value passing
Add forward declaration to avoid warnings
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Mon, 6 Jun 2011 19:32:32 +0000 (21:32 +0200)]
staging: speakup: Use kstrtoul_from_user
This patch replaces the code for getting an unsigned long from a
userspace buffer by a simple call to kstroul_from_user.
This makes it easier to read and less error prone.
Akshay Joshi [Tue, 7 Jun 2011 08:51:55 +0000 (04:51 -0400)]
Staging: Winbond: Fix assorted spacing issues.
Fix the phy_calibration.c file's spacing issues and convert the spaces
to tabs. This reduces the number of errors and warnings returned by
checkpatch.pl.
Andre Bartke [Thu, 16 Jun 2011 16:07:45 +0000 (17:07 +0100)]
gma500: Fix uninitialized variable and style issues
The return variable of psb_gtt_pin() may be used
uninitialized. Also fixed some coding style issues.
Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
[Reapplied by hand due to other changes] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Thu, 16 Jun 2011 16:06:31 +0000 (17:06 +0100)]
gma500: Make GTT pages uncached
Clean up the GTT code a bit, make the pages uncached and go via the proper
interfaces. This avoids any aliasing problems.
On the CPU side we need to access the pages via their true addresses not via
the GTT. This is fine for GEM created fb objects for X. For the kernel fb
when not in stolen RAM we are going to need to use vm_map_ram() and hope we
have enough virtual address space to steal.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The wait_event_interruptible call requires a condition as second argument that
needs to be true sometimes, which is obviously not the case with '0'. The new
logic is inspired from the tsi148 driver and takes into account Universe II chip
specifics.
Vincent Bossier [Thu, 2 Jun 2011 10:30:02 +0000 (12:30 +0200)]
Staging: VME: Fix Universe II int ack logic.
The driver must acknowledge the interrupts that have been actually serviced, not
the ones active. The current code could acknowledge an interrupt that has not
been serviced at all.
Peter Huewe [Mon, 30 May 2011 23:11:17 +0000 (01:11 +0200)]
staging: altera-stapl: Fix memory leak of altera_init()
In case kzalloc() fails the second or third time
we should free the previous allocated resources.
In order to keep one return point and to keep the cleanup code to one
place, some reordering was necessary.
Also while at it, removed the *sizeof(char) - to quote Linus:
"" Also removed the silly "* sizeof(u8)". If that isn't 1, we have way
deeper problems than a simple multiplication can fix. """
Reported-by: Andre Bartke <andre.bartke@gmail.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marin Mitov [Sat, 28 May 2011 18:45:27 +0000 (21:45 +0300)]
staging: use videobuf2 framework for drivers/staging/dt3155v4l driver
This patch transforms drivers/staging/dt3155v4l driver to use videobuf2 framework.
Tested and works with "xawtv -f".
Either streaming API or read method should be selected during kernel configuration.
If both are selected into the driver (not possible without another patching),
either due to my misunderstanding or problems in xawtv (or both), I get kernel panic
after some start/stop of xawtv (not strictly reproducible).
Tomas Winkler [Mon, 6 Jun 2011 07:44:34 +0000 (10:44 +0300)]
staging: mei: io_list functions revamp
1. remove list used for loop. There were only 2 loops used in non
time critical places so we can safely unroll them
2. normalize functions names operating on io_list to mei_io_list_<op>
3. rename mei_fe_same_id to mei_cl_cmp_id used for comparing list
elements containing struct mei_cl
4. group together io_list functions in the header file
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Oren Weil <oren.jer.weil@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix the function not to iterate nodes when the scan is aborted. The nodes
are already freed when the module is being unloaded. Patch "ath6kl: Fix a
kernel panic furing suspend/resume" tried to fix this already but it wasn't
enough as a pointer was still used even after the null check. This patch
removes the null check entirely as the wmi structure is not accessed anymore
during module unload.
Also fix a bug where the status was checked as a bitfield with '&' operator.
But it's not a bitfield, just a regular (enum like) value.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Cc: stable <stable@kernel.org> [3.0] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: fix checkpatch errors in brcmsmac driver
Several source files in brcmsmac driver have checkpatch errors that
have been removed (see below).
ERROR: spaces required around that ':' (ctx:VxV)
+ (u8)NPHY_RSSI_SEL_TSSI_5G:(u8)NPHY_RSSI_SEL_TSSI_2G;
--
ERROR: code indent should use tabs where possible
+ ^Ierr = initvars_table(base, vp, vars, count);$
--
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: fix checkpatch errors from main.c
The softmac source file main.c was passed through checkpatch to see
what issues against coding style are still present. This patch removes
the checkpatch errors listed below.
staging: brcm80211: remove checkpatch errors found in fullmac
A checkpatch run was done over the complete source files to determine
how much coding style issues there are in the driver. This patch fixes
the checkpatch errors in fullmac driver brcmfmac listed below.
ERROR: do not initialise globals to 0 or NULL
+uint dhd_poll = false;
--
ERROR: do not use assignment in if condition
+ if (!ifp && !(ifp = kmalloc(sizeof(dhd_if_t), GFP_ATOMIC))) {
--
ERROR: do not use assignment in if condition
+ if (unlikely(!(wl_cfg80211_dev && \
--
ERROR: do not initialise statics to 0 or NULL
+ static bool iscan_pass_abort = false;
--
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove 'used' keyword from function ai_ispcie()
The function ai_ispcie() is a static function that is currently being
called from the c sources in the driver. Side-effect of the keyword
is that warning will suppressed when this function is no longer used.
As there is no assembly code using this function, the keyword is removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Thu, 9 Jun 2011 14:44:41 +0000 (16:44 +0200)]
staging: brcm80211: moved typedefs to decrease header file dependencies
Code cleanup. Moved the typedefs to brcmsmac/types.h for source files that
only require opaque pointer definitions. Next patches will decrease the
number of #includes for each file.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: brcm80211: disable drivers for PPC platforms
Right now, bad things happen if you try to build these drivers for the
PPC platform as it seems that the code only has been tested and built on
the MIPS big endian platform.
So disable it on the PPC32 and PPC64 platforms for now, hopefully this
will be resolved in the future as I'm sure someone will want to use
these chips with that platform someday.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Brett Rudley <brudley@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Thu, 9 Jun 2011 20:09:07 +0000 (13:09 -0700)]
Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
staging: iio: max517: Fix iio_info changes
Staging: mei: fix debug code
Staging: cx23885: fix include of altera.h
staging: iio: error case memory leak fix
staging: ath6kl: Fix a kernel panic during suspend/resume
staging: gma500: get control from firmware framebuffer if conflicts
staging: gma500: Skip bogus LVDS VBT mode and check for LVDS before adding backlight
staging: usbip: bugfix prevent driver unbind
staging: iio: industrialio-trigger: set iio_poll_func private_data
staging: rts_pstor: use bitwise operator instead of logical one
staging: fix ath6kl build when CFG80211 is not enabled
staging: brcm80211: fix for 'multiple definition of wl_msg_level' build err
staging: fix olpc_dcon build, needs BACKLIGHT_CLASS_DEVICE
Staging: remove STAGING_EXCLUDE_BUILD option
Staging: altera: move .h file to proper place
Linus Torvalds [Thu, 9 Jun 2011 19:52:44 +0000 (12:52 -0700)]
Merge branch 'stable/xen-swiotlb.bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6
* 'stable/xen-swiotlb.bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6:
swiotlb: Export swioltb_nr_tbl and utilize it as appropiate.
Linus Torvalds [Thu, 9 Jun 2011 19:52:05 +0000 (12:52 -0700)]
Merge branch 'unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32
* 'unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32:
unicore32: using generic-y format for one line asm-generic files
unicore32: change PERCPU to PERCPU_SECTION
unicore32: add KBUILD_DEFCONFIG with unicore32_defconfig (old debug_defconfig)
unicore32: change zImage physical address, though it's PIC codes
unicore32: move rtc-puv3.c to drivers/rtc directory
Mathias Krause [Thu, 9 Jun 2011 18:05:18 +0000 (20:05 +0200)]
exec: delay address limit change until point of no return
Unconditionally changing the address limit to USER_DS and not restoring
it to its old value in the error path is wrong because it prevents us
using kernel memory on repeated calls to this function. This, in fact,
breaks the fallback of hard coded paths to the init program from being
ever successful if the first candidate fails to load.
With this patch applied switching to USER_DS is delayed until the point
of no return is reached which makes it possible to have a multi-arch
rootfs with one arch specific init binary for each of the (hard coded)
probed paths.
Since the address limit is already set to USER_DS when start_thread()
will be invoked, this redundancy can be safely removed.
Staging: comedi: add #include <linux/io.h> to a bunch of drivers
On some arches the function virt_to_bus() wasn't being pulled in due to
include chains being different. So, as we are explicitly calling this
function, explicitly include the proper header file so all will build
properly.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Stigge [Thu, 9 Jun 2011 14:21:00 +0000 (16:21 +0200)]
staging: iio: max517: Fix iio_info changes
struct iio_info introduced a bug where the second channel of a MAX518 can't be
used. This commit fixes the typo (using max518 instead of the max517 struct).
Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Connor Hansen [Sun, 5 Jun 2011 10:35:09 +0000 (03:35 -0700)]
iscsi_ibft: iscsi_ibft_find unused variable i
int i is only needed if CONFIG_ACPI is set
so move it within a new ifdef so kernels without ACPI
don't allocate space for nothing. Fixes warning too.
Signed-off-by: Connor Hansen <cmdkhh@gmail.com> Signed-off-by: Peter Jones <pjones@redhat.com>
[v2: Fixed warning when CONFIG_ACPI was defined] Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Guan Xuetao [Thu, 26 May 2011 10:17:43 +0000 (18:17 +0800)]
unicore32: using generic-y format for one line asm-generic files
The patch adds one-line asm-generic files in arch/unicore32/include/asm/Kbuild
Also, remove the old implementation in arch/unicore32/Makefile
see commit from Sam Ravnborg <d8ecc5cd8e227bc318513b5306ae88a474b8886d>
kbuild: asm-generic support
Guan Xuetao [Thu, 26 May 2011 09:19:20 +0000 (17:19 +0800)]
unicore32: change PERCPU to PERCPU_SECTION
The patch changes PERCPU to PERCPU_SECTION
see commit from Tejun Heo <0415b00d175e0d8945e6785aad21b5f157976ce0>
percpu: Always align percpu output section to PAGE_SIZE
Guan Xuetao [Mon, 16 May 2011 07:28:19 +0000 (15:28 +0800)]
unicore32: add KBUILD_DEFCONFIG with unicore32_defconfig (old debug_defconfig)
Rename debug_defconfig to unicore32_defconfig, which is a minimal config for
PKUnity-v3 (130nm) SoC board.
Also, add KBUILD_DEFCONFIG to use 'make defconfig'.