]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agostaging: lustre: ldlm: Fix warning about missing spaces
Andreas Ruprecht [Sun, 23 Nov 2014 13:37:50 +0000 (14:37 +0100)]
staging: lustre: ldlm: Fix warning about missing spaces

checkpatch.pl complains about a number of places where spaces were
missing. This patch fixes all of these errors.

For better readability, the warning of hitting the 80 character per
line limit in line 1349 introduced by this change is ignored
deliberately.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Fix overlong lines
Andreas Ruprecht [Sun, 23 Nov 2014 13:37:49 +0000 (14:37 +0100)]
staging: lustre: ldlm: Fix overlong lines

checkpatch complains about a number of lines which are over the
80 character line limit. This patch changes most of them to comply,
the few remaining lines with warnings are not changed for readability
reasons.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Add missing newlines after declarations
Andreas Ruprecht [Sun, 23 Nov 2014 13:37:48 +0000 (14:37 +0100)]
staging: lustre: ldlm: Add missing newlines after declarations

checkpatch.pl complains about a number of missing newlines after
declarations. This patch gets rid of these warnings.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:rtl8723au: fix sparse warning: incorrect type in assignment
Kinka Huang [Wed, 19 Nov 2014 16:27:02 +0000 (00:27 +0800)]
staging:rtl8723au: fix sparse warning: incorrect type in assignment

Signed-off-by: Kinka Huang <kinkabrain@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:rtl8723au: Fix sparse warning cast to restricted __le16
Tobenna P. Igwe [Tue, 18 Nov 2014 01:45:41 +0000 (01:45 +0000)]
staging:rtl8723au: Fix sparse warning cast to restricted __le16

This patch fixes the following sparse warning:

drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:343:36: warning:
cast to restricted __le16

by using the le16_to_cpus function.

Signed-off-by: Tobenna P. Igwe <ptigwe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: fix sparse warning
Aleh Suprunovich [Mon, 17 Nov 2014 10:22:41 +0000 (13:22 +0300)]
staging: rtl8723au: fix sparse warning

drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:747:1: warning: symbol
'rtl8723a_EfusePgPacketRead' was not declared. Should it be static?

Function 'rtl8723a_EfusePgPacketRead' seems to be unused in current
staging code.

Before, it was available as 'static s32 Hal_EfusePgPacketRead',
but code that was using it removed, in the same commit as rename and
signature change to 'bool rtl8723a_EfusePgPacketRead' has taken place.

Signed-off-by: Aleh Suprunovich <br@ahlamon.org>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:rtl8723au: core: Fix checkpatch warning
Sanjeev Sharma [Tue, 11 Nov 2014 09:58:14 +0000 (15:28 +0530)]
staging:rtl8723au: core: Fix checkpatch warning

This is a patch to the rtw_cmd.c file that fixes following
Warning by introducing temporary structure.

WARNING: line over 80 characters

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:rtl8723au: core: Added missing space reported by checkpatch.
Sanjeev Sharma [Tue, 11 Nov 2014 07:54:43 +0000 (13:24 +0530)]
staging:rtl8723au: core: Added missing space reported by checkpatch.

This is a patch to the rtw_cmd.c file that fixes following
Error.

ERROR: spaces required around that '>' (ctx:WxV)

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove sw led handling
Jes Sorensen [Mon, 10 Nov 2014 23:11:46 +0000 (18:11 -0500)]
staging: rtl8723au: Remove sw led handling

The rtl8723au relies on hw led support, so no point carrying a large
unused sw led infrastructure around.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove no-op function Hal_InitChannelPlan23a()
Jes Sorensen [Mon, 10 Nov 2014 23:11:45 +0000 (18:11 -0500)]
staging: rtl8723au: Remove no-op function Hal_InitChannelPlan23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove unused rtl8723a_update_txdesc() and child functions
Jes Sorensen [Mon, 10 Nov 2014 23:11:44 +0000 (18:11 -0500)]
staging: rtl8723au: Remove unused rtl8723a_update_txdesc() and child functions

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: pxmitframe->frame_tag is never set to a value > 8
Jes Sorensen [Mon, 10 Nov 2014 23:11:43 +0000 (18:11 -0500)]
staging: rtl8723au: pxmitframe->frame_tag is never set to a value > 8

No point of masking out high bits since we never set the value to
anything exceeding bits 0-3.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_dump_xframe(): Use proper ETH_P_* types
Jes Sorensen [Mon, 10 Nov 2014 23:11:42 +0000 (18:11 -0500)]
staging: rtl8723au: rtw_dump_xframe(): Use proper ETH_P_* types

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: portctrl(): Remove a pile of unnecessary clutter
Jes Sorensen [Mon, 10 Nov 2014 23:11:41 +0000 (18:11 -0500)]
staging: rtl8723au: portctrl(): Remove a pile of unnecessary clutter

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_put_snap23a(): Make it static
Jes Sorensen [Mon, 10 Nov 2014 23:11:40 +0000 (18:11 -0500)]
staging: rtl8723au: rtw_put_snap23a(): Make it static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_put_snap23a(): Use put_unaligned to set protocol
Jes Sorensen [Mon, 10 Nov 2014 23:11:39 +0000 (18:11 -0500)]
staging: rtl8723au: rtw_put_snap23a(): Use put_unaligned to set protocol

Reported-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging rtl8723au: rtw_put_smap23a(): Use common SNAP header defines
Jes Sorensen [Mon, 10 Nov 2014 23:11:38 +0000 (18:11 -0500)]
staging rtl8723au: rtw_put_smap23a(): Use common SNAP header defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove unused rtw_calculate_wlan_pkt_size_by_attribue23a()
Jes Sorensen [Mon, 10 Nov 2014 23:11:37 +0000 (18:11 -0500)]
staging: rtl8723au: Remove unused rtw_calculate_wlan_pkt_size_by_attribue23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix sparse warnings for lnet/lnet/router.c
Giedrius Statkevicius [Sun, 23 Nov 2014 20:50:14 +0000 (22:50 +0200)]
staging: lustre: Fix sparse warnings for lnet/lnet/router.c

Fix the following sparse errors:
drivers/staging/lustre/lnet/lnet/router.c:756:1: warning: symbol 'lnet_wait_known_routerstate' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:788:1: warning: symbol 'lnet_update_ni_status_locked' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:828:1: warning: symbol 'lnet_destroy_rc_data' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:848:16: warning: symbol 'lnet_create_rc_data_locked' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1228:1: warning: symbol 'lnet_destroy_rtrbuf' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1238:15: warning: symbol 'lnet_new_rtrbuf' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1274:1: warning: symbol 'lnet_rtrpool_free_bufs' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1303:1: warning: symbol 'lnet_rtrpool_alloc_bufs' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1337:1: warning: symbol 'lnet_rtrpool_init' was not declared. Should it be static?

Signed-off-by: Giedrius Statkevicius <giedriuswork@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Coalesce string fragments
Joe Perches [Sun, 23 Nov 2014 19:28:50 +0000 (11:28 -0800)]
staging: lustre: Coalesce string fragments

Join the string fragments to make it easier to grep.

Ignored all the 80+ column lines.
Added many missing spaces when coalescing formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: mdc: use __FMODE_EXEC macro
Juston Li [Wed, 19 Nov 2014 01:03:51 +0000 (17:03 -0800)]
staging: lustre: mdc: use __FMODE_EXEC macro

FMODE_EXEC is type fmode_t but is used in operations
with integers which leads to sparse warnings:
drivers/staging/lustre/lustre/mdc/mdc_lib.c:198:21: warning: restricted fmode_t degrades to integer
drivers/staging/lustre/lustre/mdc/mdc_locks.c:300:49: warning: restricted fmode_t degrades to integer

Fix by using __FMODE_EXEC macro defined in fs.h.

Note the same warnings occurs with other fmode flags
here but they don't have a corresponding int macro.

Changes since v1:
remove ifdefs. FMODE_EXEC and __FMODE_EXEC should
always be defined in fs.h

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: lustre: lnet: api-nc.c: Fix Style Warnings
Thomas Wood [Mon, 17 Nov 2014 19:54:40 +0000 (11:54 -0800)]
drivers: staging: lustre: lnet: api-nc.c: Fix Style Warnings

Remove an unecessary return statement in a void function.
Remove an unecessary space between a function name and the parentheses.

Signed-off-by: Thomas Wood <tommyandrena@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lustre: ptlrpc: Remove unnecessary braces
Balavasu Kuppusammyprathaban [Wed, 12 Nov 2014 10:12:34 +0000 (15:42 +0530)]
staging: lustre: lustre: ptlrpc: Remove unnecessary braces

Fixes the following checkpatch warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Balavasu Kuppusammyprathaban <kp.balavasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: libcfs_debug.h: remove final uses of the GOTO macro
Julia Lawall [Sun, 9 Nov 2014 09:06:33 +0000 (10:06 +0100)]
staging: lustre: libcfs_debug.h: remove final uses of the GOTO macro

Remove the GOTO macro, as it is no longer used.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: libcfs: remove final uses of the GOTO macro
Julia Lawall [Sun, 9 Nov 2014 09:06:34 +0000 (10:06 +0100)]
staging: lustre: libcfs: remove final uses of the GOTO macro

Remove the goto logging function, as it is no longer used.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: osc: remove final uses of the GOTO macro
Julia Lawall [Sun, 9 Nov 2014 09:06:32 +0000 (10:06 +0100)]
staging: lustre: osc: remove final uses of the GOTO macro

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl;
identifier rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// </smpl>

In one case (OES_INV), consecutive gotos were factorized and a break was
removed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: skein: fix sparse warnings related to shift operator
Domagoj Trsan [Mon, 17 Nov 2014 08:44:56 +0000 (09:44 +0100)]
staging: skein: fix sparse warnings related to shift operator

Fix warnings:
drivers/staging/skein/skein_base.h:89:30: warning: shift too big (50) for type int
...
drivers/staging/skein/skein_base.h:89:30: warning: shift too big (39)for type int
drivers/staging/skein/skein_base.h:89:19: warning: too many warnings

Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: lustre: Kconfig: Let LUSTRE_LLITE_LLOOP depend on all !"*_64K*...
Chen Gang [Sun, 9 Nov 2014 03:54:06 +0000 (11:54 +0800)]
drivers: staging: lustre: Kconfig: Let LUSTRE_LLITE_LLOOP depend on all !"*_64K*" page

It does not support 64K page, so let it disabled for 64K page under all
architectures. The related error (with allmodconfig under tile):

    CC [M]  drivers/staging/lustre/lustre/llite/lloop.o
  In file included from drivers/staging/lustre/lustre/llite/../include/../../include/linux/libcfs/libcfs.h:160:0,
                   from drivers/staging/lustre/lustre/llite/../include/lustre_lib.h:52,
                   from drivers/staging/lustre/lustre/llite/lloop.c:106:
  drivers/staging/lustre/lustre/llite/lloop.c: In function 'loop_set_fd':
  drivers/staging/lustre/lustre/llite/../include/../../include/linux/libcfs/libcfs_private.h:411:54: error: duplicate case value
   #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
                                                        ^
  drivers/staging/lustre/lustre/llite/lloop.c:525:2: note: in expansion of macro 'CLASSERT'
    CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));
    ^
  drivers/staging/lustre/lustre/llite/../include/../../include/linux/libcfs/libcfs_private.h:411:41: error: previously used here
   #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
                                           ^
  drivers/staging/lustre/lustre/llite/lloop.c:525:2: note: in expansion of macro 'CLASSERT'
    CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));
    ^

Use "find ./ | grep Kconfig | xargs grep --color 64K" to find all 64K
page macros.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: skein: fixed sparse warnings related to static declarations
Niklas Svensson [Sat, 8 Nov 2014 15:49:18 +0000 (16:49 +0100)]
staging: skein: fixed sparse warnings related to static declarations

drivers/staging/skein/skein_generic.c:30:5: warning: symbol 'skein256_update' was not declared. Should it be static?
drivers/staging/skein/skein_generic.c:65:5: warning: symbol 'skein512_update' was not declared. Should it be static?
drivers/staging/skein/skein_generic.c:100:5: warning: symbol 'skein1024_update' was not declared. Should it be static?

Signed-off-by: Niklas Svensson <nks@flawful.org>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Remove unnecessary parentheses.
Masanari Iida [Sat, 8 Nov 2014 07:12:19 +0000 (16:12 +0900)]
staging: lustre: Remove unnecessary parentheses.

This patch remove unnecessary parentheses.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Remove unnecessary semicolon
Masanari Iida [Sat, 8 Nov 2014 07:12:18 +0000 (16:12 +0900)]
staging: lustre: Remove unnecessary semicolon

This patch remove unnecessary semicolons from macro.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge 3.18-rc4 into staging-next
Greg Kroah-Hartman [Mon, 10 Nov 2014 03:24:26 +0000 (12:24 +0900)]
Merge 3.18-rc4 into staging-next

We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoLinux 3.18-rc4
Linus Torvalds [Sun, 9 Nov 2014 22:55:29 +0000 (14:55 -0800)]
Linux 3.18-rc4

10 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Sun, 9 Nov 2014 22:49:56 +0000 (14:49 -0800)]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:
 - enable bpf syscall for compat
 - cpu_suspend fix when checking the idle state type
 - defconfig update

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: defconfig: update defconfig for 3.18
  arm64: compat: Enable bpf syscall
  arm64: psci: fix cpu_suspend to check idle state type for index

10 years agoMerge tag 'armsoc-for-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Sun, 9 Nov 2014 22:46:36 +0000 (14:46 -0800)]
Merge tag 'armsoc-for-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Another quiet week:

   - a fix to silence edma probe error on non-supported platforms from
     Arnd
   - a fix to enable the PL clock for Parallella, to make mainline
     usable with the SDK.
   - a somewhat verbose fix for the PLL clock tree on VF610
   - enabling of SD/MMC on one of the VF610-based boards (for testing)
   - a fix for i.MX where CONFIG_SPI used to be implicitly enabled and
     now needs to be added to the defconfig instead
   - another maintainer added for bcm2835: Lee Jones"

* tag 'armsoc-for-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: dts: zynq: Enable PL clocks for Parallella
  dma: edma: move device registration to platform code
  ARM: dts: vf610: add SD node to cosmic dts
  MAINTAINERS: update bcm2835 entry
  ARM: imx: Fix the removal of CONFIG_SPI option
  ARM: imx: clk-vf610: define PLL's clock tree

10 years agoMerge branch 'devicetree/merge' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 9 Nov 2014 22:33:49 +0000 (14:33 -0800)]
Merge branch 'devicetree/merge' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux

Pull devicetree bugfix from Grant Likely:
 "One buffer overflow bug that shouldn't be left around"

* 'devicetree/merge' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux:
  of: Fix overflow bug in string property parsing functions

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 9 Nov 2014 22:30:24 +0000 (14:30 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs fix from Chris Mason:
 "It's a one liner for an error cleanup path that leads to crashes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup

10 years agoMerge tag 'driver-core-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 9 Nov 2014 22:11:58 +0000 (14:11 -0800)]
Merge tag 'driver-core-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are 3 tiny fixes for 3.18-rc4.

  One fixes up a long-stading race condition in the driver core for
  removing directories in /sys/devices/virtual/ and the other 2 fix up
  the wording of a new Kconfig option that was added in 3.18-rc1"

* tag 'driver-core-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP
  tiny: reverse logic for DISABLE_DEV_COREDUMP
  sysfs: driver core: Fix glue dir race condition by gdp_mutex

10 years agoMerge tag 'staging-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 9 Nov 2014 22:11:07 +0000 (14:11 -0800)]
Merge tag 'staging-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are some staging/iio fixes for 3.18-rc4.

  Nothing major, just a few bugfixes of things that have been reported"

* tag 'staging-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging:iio:ade7758: Remove "raw" from channel name
  staging:iio:ade7758: Fix check if channels are enabled in prenable
  staging:iio:ade7758: Fix NULL pointer deref when enabling buffer
  iio: as3935: allocate correct iio_device size
  io: accel: kxcjk-1013: Fix iio_event_spec direction
  iio: tsl4531: Fix compiler error when CONFIG_PM_OPS is not defined
  iio: adc: mxs-lradc: Disable the clock on probe failure
  iio: st_sensors: Fix buffer copy
  staging:iio:ad5933: Drop "raw" from channel names
  staging:iio:ad5933: Fix NULL pointer deref when enabling buffer

10 years agoMerge tag 'tty-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 9 Nov 2014 22:07:30 +0000 (14:07 -0800)]
Merge tag 'tty-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some tiny serial/tty fixes for 3.18-rc4 that resolve some
  reported issues"

* tag 'tty-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: Fix pty master poll() after slave closes v2
  serial: of-serial: fix uninitialized kmalloc variable
  tty/vt: don't set font mappings on vc not supporting this
  tty: serial: 8250_mtk: Fix quot calculation
  tty: Prevent "read/write wait queue active!" log flooding
  tty: Fix high cpu load if tty is unreleaseable
  serial: Fix divide-by-zero fault in uart_get_divisor()

10 years agoMerge tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 9 Nov 2014 22:05:53 +0000 (14:05 -0800)]
Merge tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB fixes for 3.18-rc4.

  Just a bunch of little fixes resolving reported issues and new device
  ids for existing drivers.  Full details are in the shortlog"

* tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
  USB: Update default usb-storage delay_use value in kernel-parameters.txt
  USB: cdc-acm: add quirk for control-line state requests
  phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
  USB: storage: Fix timeout in usb_stor_euscsi_init() and usb_stor_huawei_e220_init()
  USB: cdc-acm: only raise DTR on transitions from B0
  Revert "storage: Replace magic number with define in usb_stor_euscsi_init()"
  usb: core: notify disconnection when core detects disconnect
  usb: core: need to call usb_phy_notify_connect after device setup
  uas: Add US_FL_NO_ATA_1X quirk for 2 more Seagate models
  xhci: no switching back on non-ULT Haswell
  USB: quirks: enable device-qualifier quirk for yet another Elan touchscreen
  USB: quirks: enable device-qualifier quirk for another Elan touchscreen
  MAINTAINERS: Remove duplicate entry for usbip driver
  usb: storage: fix build warnings !CONFIG_PM
  usb: Remove references to non-existent PLAT_S5P symbol
  uas: Add NO_ATA_1X for VIA VL711 devices
  xhci: Disable streams on Asmedia 1042 xhci controllers
  USB: HWA: fix a warning message
  uas: Add US_FL_NO_ATA_1X quirk for 1 more Seagate model
  usb-storage: handle a skipped data phase
  ...

10 years agoARM: dts: zynq: Enable PL clocks for Parallella
Andreas Färber [Thu, 6 Nov 2014 17:22:10 +0000 (18:22 +0100)]
ARM: dts: zynq: Enable PL clocks for Parallella

The Parallella board comes with a U-Boot bootloader that loads one of
two predefined FPGA bitstreams before booting the kernel. Both define an
AXI interface to the on-board Epiphany processor.

Enable clocks FCLK0..FCLK3 for the Programmable Logic by default.

Otherwise accessing, e.g., the ESYSRESET register freezes the board,
as seen with the Epiphany SDK tools e-reset and e-hw-rev, using /dev/mem.

Cc: <stable@vger.kernel.org> # 3.17.x
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 8 Nov 2014 17:32:29 +0000 (09:32 -0800)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c bugfixes from Wolfram Sang:
 "One bigger cleanup (FSF address removal) and two bugfixes for I2C"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: core: Dispose OF IRQ mapping at client removal time
  i2c: at91: don't account as iowait
  i2c: remove FSF address

10 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 8 Nov 2014 16:47:16 +0000 (08:47 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "Two fixlets for the armada SoC interrupt controller"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: armada-370-xp: Fix MPIC interrupt handling
  irqchip: armada-370-xp: Fix MSI interrupt handling

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Linus Torvalds [Sat, 8 Nov 2014 16:45:20 +0000 (08:45 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "For:
   - some regression fixes at the Remote Controller core and imon driver
   - a build fix for certain randconfigs with ir-hix5hd2
   - don't feed power to satellite system at ds3000 driver init

  It also contains some fixes for drivers added for Kernel 3.18:
   - some fixes at the new ISDB-S driver, and the corresponding bits to
     fix some descriptors for this Japanese TV standard at the DVB core
   - two warning cleanups for sp2 driver if PM is disabled
   - change the default mode for the new vivid driver"

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] sp2: sp2_init() can be static
  [media] dvb:tc90522: fix always-false expression
  [media] dvb-core: set default properties of ISDB-S
  [media] dvb:tc90522: fix stats report
  [media] vivid: default to single planar device instances
  [media] imon: fix other RC type protocol support
  [media] ir-hix5hd2 fix build warning
  [media] ds3000: fix LNB supply voltage on Tevii S480 on initialization
  [media] rc5-decoder: BZ#85721: Fix RC5-SZ decoding
  [media] rc-core: fix protocol_change regression in ir_raw_event_register

10 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sat, 8 Nov 2014 02:08:02 +0000 (18:08 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This weeks' round of MIPS bug fixes for 3.18:

   - wire up the bpf syscall
   - fix TLB dump output for R3000 class TLBs
   - fix strnlen_user return value if no NUL character was found.
   - fix build with binutils 2.24.51+.  While there is no binutils 2.25
     release yet, toolchains derived from binutils 2.24.51+ are already
     in common use.
   - the Octeon GPIO code forgot to offline GPIO IRQs.
   - fix build error for XLP.
   - fix possible BUG assertion with EVA for CMA"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: Fix build with binutils 2.24.51+
  MIPS: R3000: Fix debug output for Virtual page number
  MIPS: Fix strnlen_user() return value in case of overlong strings.
  MIPS: CMA: Do not reserve memory if not required
  MIPS: Wire up bpf syscall.
  MIPS/Xlp: Remove the dead function destroy_irq() to fix build error
  MIPS: Octeon: Make Octeon GPIO IRQ chip CPU hotplug-aware

10 years agoMerge tag 'xfs-for-linus-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 7 Nov 2014 22:08:13 +0000 (14:08 -0800)]
Merge tag 'xfs-for-linus-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs

Pull xfs fixes from Dave Chinner:
 "This update fixes a warning in the new pagecache_isize_extended() and
  updates some related comments, another fix for zero-range
  misbehaviour, and an unforntuately large set of fixes for regressions
  in the bulkstat code.

  The bulkstat fixes are large but necessary.  I wouldn't normally push
  such a rework for a -rcX update, but right now xfsdump can silently
  create incomplete dumps on 3.17 and it's possible that even xfsrestore
  won't notice that the dumps were incomplete.  Hence we need to get
  this update into 3.17-stable kernels ASAP.

  In more detail, the refactoring work I committed in 3.17 has exposed a
  major hole in our QA coverage.  With both xfsdump (the major user of
  bulkstat) and xfsrestore silently ignoring missing files in the
  dump/restore process, incomplete dumps were going unnoticed if they
  were being triggered.  Many of the dump/restore filesets were so small
  that they didn't evenhave a chance of triggering the loop iteration
  bugs we introduced in 3.17, so we didn't exercise the code
  sufficiently, either.

  We have already taken steps to improve QA coverage in xfstests to
  avoid this happening again, and I've done a lot of manual verification
  of dump/restore on very large data sets (tens of millions of inodes)
  of the past week to verify this patch set results in bulkstat behaving
  the same way as it does on 3.16.

  Unfortunately, the fixes are not exactly simple - in tracking down the
  problem historic API warts were discovered (e.g xfsdump has been
  working around a 20 year old bug in the bulkstat API for the past 10
  years) and so that complicated the process of diagnosing and fixing
  the problems.  i.e. we had to fix bugs in the code as well as
  discover and re-introduce the userspace visible API bugs that we
  unwittingly "fixed" in 3.17 that xfsdump relied on to work correctly.

  Summary:

   - incorrect warnings about i_mutex locking in pagecache_isize_extended()
     and updates comments to match expected locking
   - another zero-range bug fix for stray file size updates
   - a bunch of fixes for regression in the bulkstat code introduced in
     3.17"

* tag 'xfs-for-linus-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
  xfs: track bulkstat progress by agino
  xfs: bulkstat error handling is broken
  xfs: bulkstat main loop logic is a mess
  xfs: bulkstat chunk-formatter has issues
  xfs: bulkstat chunk formatting cursor is broken
  xfs: bulkstat btree walk doesn't terminate
  mm: Fix comment before truncate_setsize()
  xfs: rework zero range to prevent invalid i_size updates
  mm: Remove false WARN_ON from pagecache_isize_extended()
  xfs: Check error during inode btree iteration in xfs_bulkstat()
  xfs: bulkstat doesn't release AGI buffer on error

10 years agoMerge tag 'regulator-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 7 Nov 2014 19:55:47 +0000 (11:55 -0800)]
Merge tag 'regulator-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "More changes than I'd like here, most of them for a single bug
  repeated in a bunch of drivers with data not being initialized
  correctly, plus a fix to lower the severity of a warning introduced in
  the last merge window which can legitimately go off so we don't want
  to alarm users excessively"

* tag 'regulator-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: s2mpa01: zero-initialize regulator match table array
  regulator: max8660: zero-initialize regulator match table array
  regulator: max77802: zero-initialize regulator match table
  regulator: max77686: zero-initialize regulator match table
  regulator: max1586: zero-initialize regulator match table array
  regulator: max77693: Fix use of uninitialized regulator config
  regulator: of: Lower the severity of the error with no container

10 years agoMerge tag 'spi-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Fri, 7 Nov 2014 19:54:44 +0000 (11:54 -0800)]
Merge tag 'spi-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi bugfixes from Mark Brown:
 "A couple of small driver fixes for v3.18, both quite problematic if
  you hit a use case that's affected"

* tag 'spi-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM
  spi: fsl-dspi: Fix CTAR selection

10 years agotiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP
Johannes Berg [Thu, 30 Oct 2014 09:00:35 +0000 (10:00 +0100)]
tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP

The ENABLE_DEV_COREDUMP option is misleading as it implies that
it gets the framework enabled, this isn't true it just allows it
to get enabled if a driver needs it.

Rename it to ALLOW_DEV_COREDUMP to better capture its semantics.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agotiny: reverse logic for DISABLE_DEV_COREDUMP
Aristeu Rozanski [Thu, 16 Oct 2014 15:49:49 +0000 (11:49 -0400)]
tiny: reverse logic for DISABLE_DEV_COREDUMP

It's desirable for allnconfig and tinyconfig targets to result in the
least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
switch off DEV_COREDUMP regardless if any drivers select
WANT_DEV_COREDUMP.

This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
'n' (as in allnconfig or tinyconfig) will effectively disable device
coredump.

Cc: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoi2c: core: Dispose OF IRQ mapping at client removal time
Laurent Pinchart [Thu, 30 Oct 2014 13:59:37 +0000 (15:59 +0200)]
i2c: core: Dispose OF IRQ mapping at client removal time

Clients instantiated from OF get an IRQ mapping created at device
registration time. Dispose the mapping when the client is removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
10 years agoi2c: at91: don't account as iowait
Wolfram Sang [Mon, 3 Nov 2014 20:16:16 +0000 (21:16 +0100)]
i2c: at91: don't account as iowait

iowait is for blkio [1]. I2C shouldn't use it.

[1] https://lkml.org/lkml/2014/11/3/317

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: stable@kernel.org
10 years agostaging: rtl8188eu: unneeded NULL check
Sudip Mukherjee [Fri, 7 Nov 2014 11:20:46 +0000 (16:50 +0530)]
staging: rtl8188eu: unneeded NULL check

before these NULL checks we are already checking it for NULL, and if
it is NULL then we are jumping to the error label and handling
the error before returning.
So we can reach this part of the code only if the variable is known
to be not NULL, and if we already know that it is not NULL, then no
need to check it again.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: unneeded return variable
Sudip Mukherjee [Fri, 7 Nov 2014 11:20:45 +0000 (16:50 +0530)]
staging: rtl8188eu: unneeded return variable

a variable is declared and initialized and then never updated in the
function.This default value is then used as the return from the
function.
So removed that unneeded return variable and returning that default
initial value directly.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoi2c: remove FSF address
Wolfram Sang [Tue, 4 Nov 2014 22:46:27 +0000 (23:46 +0100)]
i2c: remove FSF address

We have a central copy of the GPL for that. Some addresses were already
outdated.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
10 years agostaging: comedi: addi_apci_3120: absorb apci3120_ai_reset_fifo()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:32 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: absorb apci3120_ai_reset_fifo()

This function is only called by apci3120_set_chanlist(). Absorb it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: enable AI async commands
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:31 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: enable AI async commands

The async command support should now work. Enable the hook up of the command
support functions in apci3120_auto_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: switch DMA buffers after writing samples
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:30 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: switch DMA buffers after writing samples

Currently the DMA buffers are switched before writing the current samples to
the async buffer. This works but when the EOA event happens we end up with an
outstanding DMA operation in progress that gets terminated by the (*cancel).

Avoid the outstanding DMA operation by switching the DMA buffers after writing
the samples. The driver will detect the EOA event and not retart the DMA.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: change params to apci3120_interrupt_dma()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:29 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: change params to apci3120_interrupt_dma()

Pass the comedi_device and comedi_subdevice pointers to this function instead
of the irq number and void pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_interrupt_dma() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:28 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_interrupt_dma() to driver

Move this function from the included source file to the main driver
source file.

Remove the now empty included source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: use comedi_bytes_to_samples()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:27 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: use comedi_bytes_to_samples()

Use the helper function to calculate the number of samples in the DMA
buffer. For aesthetics, tidy up the local variables.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_interrupt() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:26 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_interrupt() to driver

Move this function from the included source file to the main driver
source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_cancel() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:25 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_cancel() to driver

Move this function from the included source file to the main driver
source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: use async->events to report hardware error
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:24 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: use async->events to report hardware error

In apci3120_interrupt_dma(), use the async->events to report the hardware
error and allow the core to (*cancel) the command instead of calling the
(*cancel) function directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_ai_cmd() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:23 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_ai_cmd() to driver

Move this function from the included source file to the main driver
source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_setup_dma() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:22 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_setup_dma() to driver

Move this function from the included source file to the main driver
source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_init_dma() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:21 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_init_dma() to driver

Move this function from the included source file to the main driver
source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_addon_write() to driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:20 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_addon_write() to driver

Move this function from the included source file to the main driver
source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: remove unnecessary include
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:19 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: remove unnecessary include

The <linux/sched.h> header is not needed by this driver. Remove the
include.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: add copyright information
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:18 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: add copyright information

Remove the copyright info from the included source file and add it
to the main driver source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move AI (*do_cmdtest) to main driver
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:17 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move AI (*do_cmdtest) to main driver

Move apci3120_ai_cmdtest() from the included source file to the main
driver source file. Tidy up Step 4 a bit during the move.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: fix cmd->convert_arg vaildation
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:16 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: fix cmd->convert_arg vaildation

Regardless of the cmd->scan_begin_src, the minimum cmd->convert_arg
value is 10000 (10us). Fix the validation in apci3120_ai_cmdtest().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: fix timer (*insn_config)
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:15 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: fix timer (*insn_config)

The timer subdevice in this driver does not follow the comedi API.

Fix the (*insn_config) to correctly arm, disarm, set the mode, and
get the status of the timer.

Remove the unnecessary, and broken, (*insn_write).

The new (*insn_config) does not enable the interrupt for timer 2.
Remove the interrupt support code for the timer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: fix timer (*insn_read)
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:14 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: fix timer (*insn_read)

The timer subdevice in this driver does not follow the comedi API.
Fix the (*insn_read) to work correctly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: define the AI software trigger register
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:13 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: define the AI software trigger register

Define the offset for the analog input software trigger register.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: define the AI FIFO register
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:12 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: define the AI FIFO register

Define the offset for the analog input FIFO register.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: don't use timer 2 to count scans
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:11 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: don't use timer 2 to count scans

Timer 2 can be used to count the number of scans when the cmd->stop_src
is TRIG_COUNT. Unfortunately that timer can also be used by userspace and
this breaks the async command. Timer 2 also only works for counting the
number of scans when DMA is not used.

The number of scans is counted by the core using the private data membmer
'scans_done'. Use that to detect the End-Of-Scan for both DMA and none
DMA modes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: rename private data 'ui_DmaActualBuffer'
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:10 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: rename private data 'ui_DmaActualBuffer'

Rename this CamelCase member of the private data and convert it to
a bit-field.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: rename private data 'b_DmaDoubleBuffer'
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:09 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: rename private data 'b_DmaDoubleBuffer'

Rename this CamelCase member of the private data and convert it to
a bit-field.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: rename private data 'us_UseDma'
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:08 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: rename private data 'us_UseDma'

Rename this CamelCase member of the private data and convert it to
a bit-field.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move apci3120_reset() to driver source
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:07 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move apci3120_reset() to driver source

Move this function from the included hwdrv_apci31210.c source file to
the main driver source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: tidy up apci3120_reset()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:06 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: tidy up apci3120_reset()

This function is only called during the attach of the driver and it's
called after the private data has been kzalloc'd. There is no reason
to clear any of the private data members.

Simplify the function by just writing '0' to the necessary registers
to disable all the interrupt sources and stop the timers.

For aesthetics, change the return type to void.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move DMA init code to apci3120_init_dma()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:05 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move DMA init code to apci3120_init_dma()

Move the common code used to initialize DMA to apci3120_init_dma().

This follows the programming procedure described in the APCI-3120
documentation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move APCI3120_FIFO_ADVANCE_ON_BYTE_2
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:04 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: move APCI3120_FIFO_ADVANCE_ON_BYTE_2

Move this define to the main driver source and convert it to a bit-shift.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: define the Add-On registers
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:03 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: define the Add-On registers

Define the add-On registers and bits and remove the "magic" numbers in the
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: use amcc_s5933.h defines
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:02 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: use amcc_s5933.h defines

Use the defines for the AMCC 5933 PCI controller registers and bits instead
of creating private defines in this driver.

Move the generic AGCSTS_TC_ENABLE define from this driver to the header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: introduce apci3120_addon_write()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:01 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: introduce apci3120_addon_write()

Introduce a helper function to handle the common code that writes a 32-bit
value to the 16-bit add-on register.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: introduce apci3120_init_dma()
H Hartley Sweeten [Tue, 4 Nov 2014 17:55:00 +0000 (10:55 -0700)]
staging: comedi: addi_apci_3120: introduce apci3120_init_dma()

Introduce a helper function to handle the common code that writes the DMA
start address and number of acquisitions to the AMCC Add-on registers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: remove private data 'b_ExttrigEnable'
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:59 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: remove private data 'b_ExttrigEnable'

This member of the private data is not really needed. The devpriv->ctrl
value can be checked to determine if the external trigger is enabled.
Remove the unnecessary member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: remove private data 'b_InterruptMode'
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:58 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: remove private data 'b_InterruptMode'

This member of the private data is not really needed. The interrupt mode
can be determined by checking the devpriv->mode value to see if the
interrupt is enabled. Remove the unnecessary member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: tidy up devpriv->mode in apci3120_ai_cmd()
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:57 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: tidy up devpriv->mode in apci3120_ai_cmd()

There is no reason for the separate updates of the mode register in this
function. Refactor the code so that the mode register is only updated at
the end of the function after all the necessary bits have been set.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: enable chanlist scanning if needed
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:56 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: enable chanlist scanning if needed

The 'SCAN_ENA' bit in the mode register needs to be set if the chanlist
has more than 1 channel. Set the bit in apci3120_set_chanlist() if needed.
The callers write the mode register after setting any additional bits,

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: set scan length/start after programming chanlist
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:55 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: set scan length/start after programming chanlist

The APCI-3120 documentation says that the PR/PA bits should be set after the
chanlist sequence is programmed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: reset fifo after programming chanlist
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:54 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: reset fifo after programming chanlist

The APCI-3120 documentation says that the FIFO should be reset after the
chanlist sequence is programmed.

Reset the FIFO after programming the chanlist and remove the extra FIFO
resets in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: tidy up timer 2 programming in apci3120_ai_cmd()
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:53 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: tidy up timer 2 programming in apci3120_ai_cmd()

Tidy up the programming of timer 2.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: tidy up timer programming in apci3120_ai_cmd()
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:52 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: tidy up timer programming in apci3120_ai_cmd()

Tidy up the programming of timers 0 and 1 so that only one local variable is
required.

Also, remove the unnecessary clear of devpriv->timer_mode. This value will get
set correctly by each apci3120_timer_set_mode() call. It's not necessary to
clear it first.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: absorb apci3120_cyclic_ai()
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:51 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: absorb apci3120_cyclic_ai()

This functon is called by apci3120_ai_cmd() with one additional parameter,
'mode', The 'mode' is based on the cmd->scan_begin_src.

For aesthetics, absorb the function into apci3120_ai_cmd() and use the
cmd->scan_begin_src directly to determine the 'mode'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move start_src check into apci3120_cyclic_ai()
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:50 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: move start_src check into apci3120_cyclic_ai()

For aesthetics, move the check of the cmd->start_src.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: move timer 2 enable in apci3120_cyclic_ai()
H Hartley Sweeten [Tue, 4 Nov 2014 17:54:49 +0000 (10:54 -0700)]
staging: comedi: addi_apci_3120: move timer 2 enable in apci3120_cyclic_ai()

Move the enable of timer 2 to avoid needing the extra if() check.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>