firefly-linux-kernel-4.4.55.git
11 years agoMerge 3.9-rc7 into staging-next
Greg Kroah-Hartman [Mon, 15 Apr 2013 01:44:38 +0000 (18:44 -0700)]
Merge 3.9-rc7 into staging-next

We want these fixes here.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoLinux 3.9-rc7
Linus Torvalds [Mon, 15 Apr 2013 00:45:16 +0000 (17:45 -0700)]
Linux 3.9-rc7

11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Apr 2013 18:13:24 +0000 (11:13 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Flush lazy MMU when DEBUG_PAGEALLOC is set
  x86/mm/cpa/selftest: Fix false positive in CPA self test
  x86/mm/cpa: Convert noop to functional fix
  x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
  x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates

11 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Apr 2013 18:12:17 +0000 (11:12 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Misc fixlets"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/cputime: Fix accounting on multi-threaded processes
  sched/debug: Fix sd->*_idx limit range avoiding overflow
  sched_clock: Prevent 64bit inatomicity on 32bit systems
  sched: Convert BUG_ON()s in try_to_wake_up_local() to WARN_ON_ONCE()s

11 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Apr 2013 18:10:44 +0000 (11:10 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Misc fixlets"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix error return code
  ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
  perf: Fix strncpy() use, use strlcpy() instead of strncpy()
  perf: Fix strncpy() use, always make sure it's NUL terminated
  perf: Fix ring_buffer perf_output_space() boundary calculation
  perf/x86: Fix uninitialized pt_regs in intel_pmu_drain_bts_buffer()

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sun, 14 Apr 2013 17:55:20 +0000 (10:55 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "One fix for a hotplug locking regressions, and one fix for an oops if
  you unplug the monitor at an inopportune moment on the udl device."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/fb-helper: Fix locking in drm_fb_helper_hotplug_event
  udl: handle EDID failure properly.

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Sun, 14 Apr 2013 17:54:40 +0000 (10:54 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu

Pull m68knommu fix from Greg Ungerer:
 "This contains only a single compilation fix for ColdFire m68k targets
  that use local non-GPIOLIB support."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k: define a local gpio_request_one() function

11 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Sun, 14 Apr 2013 17:53:54 +0000 (10:53 -0700)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull watchdog fix from Wim Van Sebroeck:
 "It will fix compile errors for the at91rm9200_wdt driver"

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: Revert the AT91RM9200_WATCHDOG dependency

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 14 Apr 2013 17:52:54 +0000 (10:52 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull one more btrfs fix from Chris Mason:
 "This has a recent fix from Josef for our tree log replay code.  It
  fixes problems where the inode counter for the number of bytes in the
  file wasn't getting updated properly during fsync replay.

  The commit did get rebased this morning, but it was only to clean up
  the subject line.  The code hasn't changed."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: make sure nbytes are right after log replay

11 years agoMerge tag 'trace-fixes-v3.9-rc-v3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Apr 2013 17:50:55 +0000 (10:50 -0700)]
Merge tag 'trace-fixes-v3.9-rc-v3' of git://git./linux/kernel/git/rostedt/linux-trace

Pull ftrace fixes from Steven Rostedt:
 "Namhyung Kim found and fixed a bug that can crash the kernel by simply
  doing: echo 1234 | tee -a /sys/kernel/debug/tracing/set_ftrace_pid

  Luckily, this can only be done by root, but still is a nasty bug."

* tag 'trace-fixes-v3.9-rc-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
  tracing: Fix possible NULL pointer dereferences

11 years agoAdd file_ns_capable() helper function for open-time capability checking
Linus Torvalds [Sun, 14 Apr 2013 17:06:31 +0000 (10:06 -0700)]
Add file_ns_capable() helper function for open-time capability checking

Nothing is using it yet, but this will allow us to delay the open-time
checks to use time, without breaking the normal UNIX permission
semantics where permissions are determined by the opener (and the file
descriptor can then be passed to a different process, or the process can
drop capabilities).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agowatchdog: Revert the AT91RM9200_WATCHDOG dependency
Nicolas Ferre [Wed, 10 Apr 2013 12:36:22 +0000 (14:36 +0200)]
watchdog: Revert the AT91RM9200_WATCHDOG dependency

Compiling the at91rm9200_wdt.c driver without at91rm9200
support was leading to several errors:

drivers/built-in.o: In function `at91_wdt_close':
at91_adc.c:(.text+0xc9fe4): undefined reference to `at91_st_base'
drivers/built-in.o: In function `at91_wdt_write':
at91_adc.c:(.text+0xca004): undefined reference to `at91_st_base'
drivers/built-in.o: In function `at91wdt_shutdown':
at91_adc.c:(.text+0xca01c): undefined reference to `at91_st_base'
drivers/built-in.o: In function `at91wdt_suspend':
at91_adc.c:(.text+0xca038): undefined reference to `at91_st_base'
drivers/built-in.o: In function `at91_wdt_open':
at91_adc.c:(.text+0xca0cc): undefined reference to `at91_st_base'
drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references to
`at91_st_base' follow

So, reverting the modification of the "depends" Kconfig line
introduced by patch a6a1bcd37 (watchdog: at91rm9200: add DT support)
seems to be the good solution.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
11 years agovfs: Revert spurious fix to spinning prevention in prune_icache_sb
Suleiman Souhlal [Sat, 13 Apr 2013 23:03:06 +0000 (16:03 -0700)]
vfs: Revert spurious fix to spinning prevention in prune_icache_sb

Revert commit 62a3ddef6181 ("vfs: fix spinning prevention in prune_icache_sb").

This commit doesn't look right: since we are looking at the tail of the
list (sb->s_inode_lru.prev) if we want to skip an inode, we should put
it back at the head of the list instead of the tail, otherwise we will
keep spinning on it.

Discovered when investigating why prune_icache_sb came top in perf
reports of a swapping load.

Signed-off-by: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agokobject: fix kset_find_obj() race with concurrent last kobject_put()
Linus Torvalds [Sat, 13 Apr 2013 22:15:30 +0000 (15:15 -0700)]
kobject: fix kset_find_obj() race with concurrent last kobject_put()

Anatol Pomozov identified a race condition that hits module unloading
and re-loading.  To quote Anatol:

 "This is a race codition that exists between kset_find_obj() and
  kobject_put().  kset_find_obj() might return kobject that has refcount
  equal to 0 if this kobject is freeing by kobject_put() in other
  thread.

  Here is timeline for the crash in case if kset_find_obj() searches for
  an object tht nobody holds and other thread is doing kobject_put() on
  the same kobject:

    THREAD A (calls kset_find_obj())     THREAD B (calls kobject_put())
    splin_lock()
                                         atomic_dec_return(kobj->kref), counter gets zero here
                                         ... starts kobject cleanup ....
                                         spin_lock() // WAIT thread A in kobj_kset_leave()
    iterate over kset->list
    atomic_inc(kobj->kref) (counter becomes 1)
    spin_unlock()
                                         spin_lock() // taken
                                         // it does not know that thread A increased counter so it
                                         remove obj from list
                                         spin_unlock()
                                         vfree(module) // frees module object with containing kobj

    // kobj points to freed memory area!!
    kobject_put(kobj) // OOPS!!!!

  The race above happens because module.c tries to use kset_find_obj()
  when somebody unloads module.  The module.c code was introduced in
  commit 6494a93d55fa"

Anatol supplied a patch specific for module.c that worked around the
problem by simply not using kset_find_obj() at all, but rather than make
a local band-aid, this just fixes kset_find_obj() to be thread-safe
using the proper model of refusing the get a new reference if the
refcount has already dropped to zero.

See examples of this proper refcount handling not only in the kref
documentation, but in various other equivalent uses of this pattern by
grepping for atomic_inc_not_zero().

[ Side note: the module race does indicate that module loading and
  unloading is not properly serialized wrt sysfs information using the
  module mutex.  That may require further thought, but this is the
  correct fix at the kobject layer regardless. ]

Reported-analyzed-and-tested-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agostaging: zcache/debug: fix coding style
Wanpeng Li [Sat, 13 Apr 2013 13:01:31 +0000 (21:01 +0800)]
staging: zcache/debug: fix coding style

Fix coding style issue: ERROR: space prohibited before that '++' (ctx:WxO)
and line beyond 8 characters.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entry
Wanpeng Li [Sat, 13 Apr 2013 13:01:30 +0000 (21:01 +0800)]
staging: ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entry

Add CONFIG_RAMSTER_DEBUG Kconfig entry.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ramster: Add incremental accessory counters
Wanpeng Li [Sat, 13 Apr 2013 13:01:29 +0000 (21:01 +0800)]
staging: ramster: Add incremental accessory counters

Add incremental accessory counters that are going to be used for
debug fs entries.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ramster/debug: Use an array to initialize/use debugfs attributes
Wanpeng Li [Sat, 13 Apr 2013 13:01:28 +0000 (21:01 +0800)]
staging: ramster/debug: Use an array to initialize/use debugfs attributes

Use an array to initialize/use debugfs attributes, it makes them
neater as zcache/debug.c does.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ramster: Move debugfs code out of ramster.c file
Wanpeng Li [Sat, 13 Apr 2013 13:01:27 +0000 (21:01 +0800)]
staging: ramster: Move debugfs code out of ramster.c file

Note that at this point there is no CONFIG_RAMSTER_DEBUG
option in the Kconfig. So in effect all of the counters
are nop until that option gets introduced in patch:
ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entry

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoBtrfs: make sure nbytes are right after log replay
Josef Bacik [Fri, 5 Apr 2013 20:50:09 +0000 (20:50 +0000)]
Btrfs: make sure nbytes are right after log replay

While trying to track down a tree log replay bug I noticed that fsck was always
complaining about nbytes not being right for our fsynced file.  That is because
the new fsync stuff doesn't wait for ordered extents to complete, so the inodes
nbytes are not necessarily updated properly when we log it.  So to fix this we
need to set nbytes to whatever it is on the inode that is on disk, so when we
replay the extents we can just add the bytes that are being added as we replay
the extent.  This makes it work for the case that we have the wrong nbytes or
the case that we logged everything and nbytes is actually correct.  With this
I'm no longer getting nbytes errors out of btrfsck.

Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agox86-32: Fix possible incomplete TLB invalidate with PAE pagetables
Dave Hansen [Fri, 12 Apr 2013 23:23:54 +0000 (16:23 -0700)]
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables

This patch attempts to fix:

https://bugzilla.kernel.org/show_bug.cgi?id=56461

The symptom is a crash and messages like this:

chrome: Corrupted page table at address 34a03000
*pdpt = 0000000000000000 *pde = 0000000000000000
Bad pagetable: 000f [#1] PREEMPT SMP

Ingo guesses this got introduced by commit 611ae8e3f520 ("x86/tlb:
enable tlb flush range support for x86") since that code started to free
unused pagetables.

On x86-32 PAE kernels, that new code has the potential to free an entire
PMD page and will clear one of the four page-directory-pointer-table
(aka pgd_t entries).

The hardware aggressively "caches" these top-level entries and invlpg
does not actually affect the CPU's copy.  If we clear one we *HAVE* to
do a full TLB flush, otherwise we might continue using a freed pmd page.
(note, we do this properly on the population side in pud_populate()).

This patch tracks whenever we clear one of these entries in the 'struct
mmu_gather', and ensures that we follow up with a full tlb flush.

BTW, I disassembled and checked that:

if (tlb->fullmm == 0)
and
if (!tlb->fullmm && !tlb->need_flush_all)

generate essentially the same code, so there should be zero impact there
to the !PAE case.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Artem S Tashkinov <t.artem@mailcity.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Fri, 12 Apr 2013 22:26:42 +0000 (15:26 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Here are remaining target-pending items for v3.9-rc7 code.

  The tcm_vhost patches are more than I'd usually include in a -rc7
  pull, but are changes required for v3.9 to work correctly with the
  pending vhost-scsi-pci QEMU upstream series merge.  (Paolo CC'ed)

  Plus Asias's conversion to use vhost_virtqueue->private_data + RCU for
  managing vhost-scsi endpoints has gotten alot of review + testing over
  the past weeks, and MST has ACKed the full series.

  Also, there is a target patch to fix a long-standing bug within
  control CDB handling with Standby/Offline/Transition ALUA port access
  states, that had been incorrectly rejecting the control CDBs required
  for LUN scan to work during these port group states.  CC'ing to
  stable."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
  tcm_vhost: Send bad target to guest when cmd fails
  tcm_vhost: Add vhost_scsi_send_bad_target() helper
  tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq
  tcm_vhost: Remove double check of response
  tcm_vhost: Initialize vq->last_used_idx when set endpoint
  tcm_vhost: Use vq->private_data to indicate if the endpoint is setup
  tcm_vhost: Use ACCESS_ONCE for vs->vs_tpg[target] access

11 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 12 Apr 2013 22:18:56 +0000 (15:18 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of ten bug fixes (and two consisting of copyright year
  update and version number change) pretty much all of which involve
  either a crash or a hang except the removal of the random sleep from
  the qla2xxx driver (which is a coding error so bad, we want it gone
  before anyone has a chance to copy it)."

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] lpfc: fix potential NULL pointer dereference in lpfc_sli4_rq_put()
  [SCSI] libsas: fix handling vacant phy in sas_set_ex_phy()
  [SCSI] ibmvscsi: Fix slave_configure deadlock
  [SCSI] qla2xxx: Update the driver version to 8.04.00.13-k.
  [SCSI] qla2xxx: Remove debug code that msleeps for random duration.
  [SCSI] qla2xxx: Update copyright dates information in LICENSE.qla2xxx file.
  [SCSI] qla2xxx: Fix crash during firmware dump procedure.
  [SCSI] Revert "qla2xxx: Add setting of driver version string for vendor application."
  [SCSI] ipr: dlpar failed when adding an adapter back
  [SCSI] ipr: fix addition of abort command to HRRQ free queue
  [SCSI] st: Take additional queue ref in st_probe
  [SCSI] libsas: use right function to alloc smp response
  [SCSI] ipr: ipr_test_msi() fails when running with msi-x enabled adapter

11 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 12 Apr 2013 22:18:20 +0000 (15:18 -0700)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fix from Steve French:
 "Fixes a regression in cifs in which a password which begins with a
  comma is parsed incorrectly as a blank password"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Allow passwords which begin with a delimitor

11 years agostaging: ramster: decrease foregin pers pages when count < 0
Wanpeng Li [Fri, 12 Apr 2013 01:31:21 +0000 (09:31 +0800)]
staging: ramster: decrease foregin pers pages when count < 0

commit 9a5c59687ad ("staging: ramster: Provide accessory functions for
counter decrease") forget decrease foregin pers pages, this patch fix
it.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_dio200_pci: use pci_ioremap_bar()
Ian Abbott [Fri, 12 Apr 2013 12:00:49 +0000 (13:00 +0100)]
staging: comedi: amplc_dio200_pci: use pci_ioremap_bar()

Use `pci_ioremap_bar()` to ioremap the PCI memory resources.  That
function just takes the PCI device and a bar index.  It also has some
additional sanity checks to make sure the bar is actually a memory
resource.

Eliminate some local variables from `dio200_pcie_board_setup()` and
`dio200_pci_auto_attach()` that were used to hold the results of
`pci_resource_len()` and `pci_resource_start()` that were only used
once.  Also eliminate the check that the bar is a memory resource in
`dio200_pcie_board_setup()` as `pci_ioremap_bar()` will do that for us.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: 8255_pci: check BAR resource type directly
Ian Abbott [Fri, 12 Apr 2013 12:57:54 +0000 (13:57 +0100)]
staging: comedi: 8255_pci: check BAR resource type directly

This driver handles one or more 8255 DIO subdevices mapped contiguously
at the start of a PCI BAR resource.  The resource may be a portio
resource or an mmio resource.  The driver currently checks the `is_mmio`
member of the matching element of `pci_8255_boards[]` to determine the
type of resource.  Rather than doing that, get the information straight
from the horse's mouth by checking the resource flags of the PCI BAR
and eliminate the `is_mmio` member.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_*: replace ADDIDATA_OLD with AMCC
Ian Abbott [Fri, 12 Apr 2013 14:01:10 +0000 (15:01 +0100)]
staging: comedi: addi_apci_*: replace ADDIDATA_OLD with AMCC

PCI vendor ID 0x10e8 is assigned to Applied Micro Circuits Corporation
(recently AppliedMicro, but AMCC on NASDAQ).  The ID currently appears
as `PCI_VENDOR_ID_ADDIDATA_OLD` in "include/linux/pci_ids.h" and is used
by the "addi_apci_1500", "addi_apci_1710" and "addi_apci_3120" comedi
drivers.  (It is also used by the "8250_pci" serial driver.)

"comedidev.h" defines `PCI_VENDOR_ID_AMCC` locally with the same value
as `PCI_VENDOR_ID_ADDIDATA_OLD` and is currently used by the
"adl_pci9118" comedi driver.  Despite `PCI_VENDOR_ID_ADDIDATA_OLD` being
in "pci_ids.h", `PCI_VENDOR_ID_AMCC` is a more sensible name, so change
the comedi drivers to use it.

Once several drivers are using `PCI_VENDOR_ID_AMCC` we'll have a good
excuse to move it into "pci_ids.h" and change the "8250_pci" serial
driver to use it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc263: split out PCI support
Ian Abbott [Fri, 12 Apr 2013 16:01:54 +0000 (17:01 +0100)]
staging: comedi: amplc_pc263: split out PCI support

The "amplc_pc263" module is a hybrid driver for Amplicon PC263 (ISA) and
PCI263 (PCI) and uses conditional compilation (and compiler
optimization) to compile in the support for the different bus types.

Split out support for the PCI263 into a new module "amplc_pci263",
retaining support for the PC263 in the existing module "amplc_pc263".

Don't bother supporting the legacy attach mechanism for PCI board in the
new module as that is no longer in vogue for the comedi drivers and the
PCI263 board has no special configuration requirements.

Although the code to handle the single subdevice of each board is the
same for both drivers, this is only a small amount of code and I don't
think it's worth creating a common module to handle it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbols
H Hartley Sweeten [Fri, 12 Apr 2013 17:11:54 +0000 (10:11 -0700)]
staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbols

Comedi is licensed under GPL. Some if its exports are currently
EXPORT_SYMBOL() and others are EXPORT_SYMBOL_GPL(). Change them all
to EXPORT_SYMBOL_GPL() and see if anyone reports any fall out.

If any of the symbols "need" to be EXPORT_SYMBOL() they will be
addressed as needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: unionxx5: allocate 'usp' before using it
H Hartley Sweeten [Fri, 12 Apr 2013 16:58:45 +0000 (09:58 -0700)]
staging: comedi: unionxx5: allocate 'usp' before using it

As reported by the kbuild test robot, the 'usp' pointer needs to be
allocated before being used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: fix error return code in dwc2_hcd_init()
Wei Yongjun [Fri, 12 Apr 2013 14:41:48 +0000 (22:41 +0800)]
staging: dwc2: fix error return code in dwc2_hcd_init()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section
Steven Rostedt (Red Hat) [Fri, 12 Apr 2013 20:40:13 +0000 (16:40 -0400)]
ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section

As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to
be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the
ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.

Cc: stable@vger.kernel.org
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
11 years agotracing: Fix possible NULL pointer dereferences
Namhyung Kim [Thu, 11 Apr 2013 06:55:01 +0000 (15:55 +0900)]
tracing: Fix possible NULL pointer dereferences

Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops.  However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic.

It can be easily reproduced with following command:

  $ cd /sys/kernel/debug/tracing
  $ echo 1234 | sudo tee -a set_ftrace_pid

In this example, GNU coreutils' tee opens the file with fopen(, "a")
and then the fopen() internally calls lseek().

Link: http://lkml.kernel.org/r/1365663302-2170-1-git-send-email-namhyung@kernel.org
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
11 years agoMerge tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 12 Apr 2013 14:45:17 +0000 (07:45 -0700)]
Merge tag 'sound-3.9' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This contains a few small ASoC fixes (wm8903, wm5102, samsung-i2s,
  tegra, and soc-compress) and an endian fix for NI USB-audio devices,
  update for Mark's e-mail address.

  No scary changes, AFAIS."

* tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  MAINTAINERS: Update e-mail address
  ASoC: wm5102: Correct lookup of arizona struct in SYSCLK event
  ASoC: wm8903: Fix the bypass to HP/LINEOUT when no DAC or ADC is running
  ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*
  ASoC: tegra: Don't claim to support PCM pause and resume
  ASoC: Samsung: set drvdata before adding secondary device
  ASoC: Samsung: return error if drvdata is not set
  ASoC: compress: Cancel delayed power down if needed
  ASoC: core: Fix to check return value of snd_soc_update_bits_locked()

11 years agoMerge tag 'asoc-maintainers-v3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Takashi Iwai [Fri, 12 Apr 2013 11:53:35 +0000 (13:53 +0200)]
Merge tag 'asoc-maintainers-v3.9-rc6' of git://git./linux/kernel/git/broonie/sound into for-linus

MAINTAINERS: Update e-mail address

Update the e-mail address I use for subsystems.

11 years agoMAINTAINERS: Update e-mail address
Mark Brown [Fri, 12 Apr 2013 10:39:57 +0000 (11:39 +0100)]
MAINTAINERS: Update e-mail address

Update the e-mail address I use for subsystems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoMerge tag 'asoc-v3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Fri, 12 Apr 2013 08:27:39 +0000 (10:27 +0200)]
Merge tag 'asoc-v3.9-rc6' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v3.9

A few updates, more than I'd like, fixing some relatively small issues
but mostly driver specific ones.  Nothing wildly exciting so if it
doesn't make v3.9 it won't be the end of the world but it'd be nice.

11 years agox86/mm: Flush lazy MMU when DEBUG_PAGEALLOC is set
Boris Ostrovsky [Thu, 11 Apr 2013 17:59:52 +0000 (13:59 -0400)]
x86/mm: Flush lazy MMU when DEBUG_PAGEALLOC is set

When CONFIG_DEBUG_PAGEALLOC is set page table updates made by
kernel_map_pages() are not made visible (via TLB flush)
immediately if lazy MMU is on. In environments that support lazy
MMU (e.g. Xen) this may lead to fatal page faults, for example,
when zap_pte_range() needs to allocate pages in
__tlb_remove_page() -> tlb_next_batch().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: konrad.wilk@oracle.com
Link: http://lkml.kernel.org/r/1365703192-2089-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agox86/mm/cpa/selftest: Fix false positive in CPA self test
Andrea Arcangeli [Thu, 11 Apr 2013 13:36:09 +0000 (15:36 +0200)]
x86/mm/cpa/selftest: Fix false positive in CPA self test

If the pmd is not present, _PAGE_PSE will not be set anymore.
Fix the false positive.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Stefan Bader <stefan.bader@canonical.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/1365687369-30802-1-git-send-email-aarcange@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agoperf: Fix error return code
Wei Yongjun [Fri, 12 Apr 2013 03:05:54 +0000 (11:05 +0800)]
perf: Fix error return code

Fix to return -ENOMEM in the allocation error case instead of 0
(if pmu_bus_running == 1), as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Cc: acme@ghostprotocols.net
Link: http://lkml.kernel.org/r/CAPgLHd8j_fWcgqe%3DKLWjpBj%2B%3Do0Pw6Z-SEq%3DNTPU08c2w1tngQ@mail.gmail.com
[ Tweaked the error code setting placement and the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agodrm/fb-helper: Fix locking in drm_fb_helper_hotplug_event
Daniel Vetter [Thu, 11 Apr 2013 14:26:55 +0000 (14:26 +0000)]
drm/fb-helper: Fix locking in drm_fb_helper_hotplug_event

Driver's and ->fill_modes functions are allowed to grab crtc mutexes
(for e.g. load detect). Hence we need to first only grab the general
kms mutex, and only in a second step grab all locks to do the
modesets.

This prevents a deadlock on my gm45 in the tv load detect code called
by drm_helper_probe_single_connector_modes.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoudl: handle EDID failure properly.
Dave Airlie [Fri, 12 Apr 2013 03:25:20 +0000 (13:25 +1000)]
udl: handle EDID failure properly.

Don't oops seems proper.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Fri, 12 Apr 2013 03:35:11 +0000 (20:35 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "The first one fixes issue in pl330 to check for DT compatible and
  the second one fixes omap-dma to start without delay"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: omap-dma: Start DMA without delay for cyclic channels
  DMA: PL330: Add check if device tree compatible

11 years agoMerge tag 'pm-3.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 12 Apr 2013 03:33:38 +0000 (20:33 -0700)]
Merge tag 'pm-3.9-rc7' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:

 - System reboot/halt fix related to CPU offline ordering from Huacai
   Chen.

 - intel_pstate driver fix for a delay time computation error
   occasionally crashing systems using it from Dirk Brandewie.

* tag 'pm-3.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()
  cpufreq / intel_pstate: Set timer timeout correctly

11 years agoMerge tag 'regmap-v3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Fri, 12 Apr 2013 01:22:20 +0000 (18:22 -0700)]
Merge tag 'regmap-v3.9-rc6' of git://git./linux/kernel/git/broonie/regmap

Pull regmap revert from Mark Brown:
 "regmap: Back out work buffer fix

  This reverts commit bc8ce4 (regmap: don't corrupt work buffer in
  _regmap_raw_write()) since it turns out that it can cause issues when
  taken in isolation from the other changes in -next that lead to its
  discovery.  On the basis that nobody noticed the problems for quite
  some time without that subsequent work let's drop it from v3.9."

* tag 'regmap-v3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Back out work buffer fix

11 years agoMerge tag 'gpio-fixes-v3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 12 Apr 2013 01:21:45 +0000 (18:21 -0700)]
Merge tag 'gpio-fixes-v3.9-rc6' of git://git./linux/kernel/git/linusw/linux-gpio

Pull GPIO fix from Linus Walleij:
 "Oneliner fix for the PCA 953x driver."

* tag 'gpio-fixes-v3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: pca953x: fix irq_domain_add_simple usage

11 years agoMerge tag 'arm-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Fri, 12 Apr 2013 01:20:31 +0000 (18:20 -0700)]
Merge tag 'arm-soc-fixes' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC bug fixes from Arnd Bergmann:
 "A little later during the week than the last few pull requests, since
  there was very little that came in before 3.9-rc6.  At least things
  have calmed down again here.

  Some important bug fixes that came in over the last 10 days, mostly
  mvebu and imx:

   - Multiple regressions on i.mx following the conversion of the clock
     code, hopefully the last we are seeing of those.
   - a regression in the mvebu irq handling code
   - An incorrect register offset in the rewritten s3c24xx irq code.
   - Two bugs in setting up the iomega_ix2_200 machine
   - Turning on an extra bus clock on imx
   - A MAINTAINERS file entry for Roland Stigge"

* tag 'arm-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  arm: mvebu: Fix the irq map function in SMP mode
  Fix GE0/GE1 init on ix2-200 as GE0 has no PHY
  ARM: S3C24XX: Fix interrupt pending register offset of the EINT controller
  ARM: S3C24XX: Correct NR_IRQS definition for s3c2440
  ARM i.MX6: Fix ldb_di clock selection
  ARM: imx: provide twd clock lookup from device tree
  ARM: imx35 Bugfix admux clock
  ARM: clk-imx35: Bugfix iomux clock
  ARM: mxs: Slow down the I2C clock speed
  MAINTAINERS: Add maintainer for LPC32xx
  ARM: Kirkwood: Fix typo in the definition of ix2-200 rebuild LED

11 years ago[SCSI] lpfc: fix potential NULL pointer dereference in lpfc_sli4_rq_put()
Wei Yongjun [Sun, 2 Dec 2012 13:33:24 +0000 (08:33 -0500)]
[SCSI] lpfc: fix potential NULL pointer dereference in lpfc_sli4_rq_put()

The dereference to 'put_index' should be moved below the NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years agostaging: dwc2: Make dwc2_set_uninitialized more specific
Matthijs Kooijman [Thu, 11 Apr 2013 16:43:47 +0000 (18:43 +0200)]
staging: dwc2: Make dwc2_set_uninitialized more specific

Before, it was a function that would set all members of a given struct
containing only int members to -1. Now, it is renamed to
dwc_set_all_params and it works only on the dwc2_core_params struct.
This makes sure that all of the slightly dubious casting and assumptions
happen inside the function instead of by the caller.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: set the driver name to "dwc2"
Matthijs Kooijman [Thu, 11 Apr 2013 16:43:46 +0000 (18:43 +0200)]
staging: dwc2: set the driver name to "dwc2"

Previously, it was "dwc_otg", but this does not correspond to the
directory name and might cause confusion with the old out-of-tree
dwc_otg driver of which many versions circulate.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: cancel_work when module gets unloaded
Devendra Naga [Wed, 10 Apr 2013 07:04:00 +0000 (12:34 +0530)]
staging: et131x: cancel_work when module gets unloaded

The work item has been added to the queue using INIT_WORK and scheduled
in interrupt handler. when module unloads that work item has not been
removed from the queue. remove and stop its further execution when the
module unloaded

Cc: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ramster: Provide accessory functions for counter decrease
Wanpeng Li [Wed, 10 Apr 2013 00:25:54 +0000 (08:25 +0800)]
staging: ramster: Provide accessory functions for counter decrease

This patch enables these functions to be wrapped and
can disable/enable this with CONFIG_DEBUG_FS.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ramster: Provide accessory functions for counter increase
Wanpeng Li [Wed, 10 Apr 2013 00:25:53 +0000 (08:25 +0800)]
staging: ramster: Provide accessory functions for counter increase

This patch enables these functions to be wrapped and can disable/enable
this with CONFIG_DEBUG_FS.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: register common irq handler in dwc2_core_init
Matthijs Kooijman [Thu, 11 Apr 2013 15:52:41 +0000 (17:52 +0200)]
staging: dwc2: register common irq handler in dwc2_core_init

Before, this was initialized in pci.c, after the dwc2_hcd_init was
called and the interrupts were enabled. This opened up a small time
window where common interrupts could be triggered, but there was no
handler for them, causing them to keep triggering infinitely and locking
up the machine.

On my RT3052 board this bug could be easily reproduced by hardcoding
the console log level to 8, so that a bunch of debug output from the dwc2
driver was generated inside this time window. This caused the interrupt
lockup to occur almost every time.

By requesting the irq inside dwc2_core_init and by disabling interrupts
before calling dwc2_core_init instead of after, we can be sure the
handler is registered before the interrupts are enabled, which should
close this window.

Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: don't pass IRQ_LEVEL to devm_request_irq
Matthijs Kooijman [Thu, 11 Apr 2013 15:52:40 +0000 (17:52 +0200)]
staging: dwc2: don't pass IRQ_LEVEL to devm_request_irq

It seems this flag is intended to pass to irq_set_status_flags, not
request_irq, and is not available on all architectures. Its value
corresponds to IRQF_PROBE_SHARED, which shouldn't be needed for this
driver, so removing this flag should be safe.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: fix account foregin counters against zero-filled pages
Wanpeng Li [Wed, 10 Apr 2013 00:25:51 +0000 (08:25 +0800)]
staging: zcache: fix account foregin counters against zero-filled pages

zero-filled pages won't be compressed and sent to remote system. Monitor
the number ephemeral and persistent pages that Ramster has sent make no
sense. This patch skip account foregin counters against zero-filled pages.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: update TODO file
Sascha Hauer [Thu, 11 Apr 2013 09:04:21 +0000 (11:04 +0200)]
staging: drm/imx: update TODO file

One of the main things to do to the driver is to support
the common display famework (CDF) to hit mainline. As this will
make some changes to the devicetree bindings necessary it makes
sense to do it before we move out of staging.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ii_pci20kc: remove comment about 2.4 kernels
H Hartley Sweeten [Wed, 10 Apr 2013 18:32:51 +0000 (11:32 -0700)]
staging: comedi: ii_pci20kc: remove comment about 2.4 kernels

This comment about using ioremap() for 2.4 kernels is not necessary.

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>
11 years agostaging: comedi: addi_common: remove i_IorangeBase0 from boardinfo
H Hartley Sweeten [Wed, 10 Apr 2013 18:32:30 +0000 (11:32 -0700)]
staging: comedi: addi_common: remove i_IorangeBase0 from boardinfo

The i_IorangeBase0 boardinfo is not used. Remove 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>
11 years agostaging: comedi: addi_common: remove i_IorangeBase2 from boardinfo
H Hartley Sweeten [Wed, 10 Apr 2013 18:32:07 +0000 (11:32 -0700)]
staging: comedi: addi_common: remove i_IorangeBase2 from boardinfo

The i_IorangeBase2 boardinfo is not used. Remove 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>
11 years agostaging: comedi: addi_common: remove i_IorangeBase3 from boardinfo
H Hartley Sweeten [Wed, 10 Apr 2013 18:31:46 +0000 (11:31 -0700)]
staging: comedi: addi_common: remove i_IorangeBase3 from boardinfo

When it is used, the entire PCI bar is ioremap'ed with pci_ioremap_bar().
The i_IorangeBase3 boardinfo is no longer needed.

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>
11 years agostaging: comedi: addi_common: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:31:24 +0000 (11:31 -0700)]
staging: comedi: addi_common: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

This also makes sure that the entire PCI bar is ioremap'ed instead
of assuming the size of the bar.

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>
11 years agostaging: comedi: jr3_pci: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:31:05 +0000 (11:31 -0700)]
staging: comedi: jr3_pci: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

This also makes sure that the entire PCI bar is ioremap'ed instead
of assuming the size of the bar.

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>
11 years agostaging: comedi: mite: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:30:45 +0000 (11:30 -0700)]
staging: comedi: mite: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

This also makes sure that the entire PCI bar is ioremap'ed instead
of assuming the size of a bar.

For aesthetic reasons, don't set the private data phys_addr vars
until after the ioremap is successful.

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>
11 years agostaging: comedi: icp_multi: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:30:28 +0000 (11:30 -0700)]
staging: comedi: icp_multi: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

This also makes sure that the entire PCI bar is ioremap'ed instead
of assuming the size of the bar.

Also, since this driver only uses memory mapped I/O it is not
necessary to set the dev->iobase.

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>
11 years agostaging: comedi: 8255_pci: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:30:11 +0000 (11:30 -0700)]
staging: comedi: 8255_pci: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

Refactor the code a bit. The dev->iobase only needs to be set
when the board does not use memory mapped I/O. And the 'iobase'
passed to subdev_8255_init() is an unsigned long.

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>
11 years agostaging: comedi: dt3000: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:29:07 +0000 (11:29 -0700)]
staging: comedi: dt3000: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

This also makes sure that the entire PCI bar is ioremap'ed instead
of assuming the size of the bar.

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>
11 years agostaging: comedi: cb_pcidas64: tidy up the *phys_iobase
H Hartley Sweeten [Wed, 10 Apr 2013 18:28:47 +0000 (11:28 -0700)]
staging: comedi: cb_pcidas64: tidy up the *phys_iobase

This driver does not use the dev->iobase so don't bother initializing
it.

The plx9080_phys_iobase is not used in the driver. Remove it from the
private data.

Tidy up the initialization of the other phy_iobase 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>
11 years agostaging: comedi: cb_pcidas64: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:28:28 +0000 (11:28 -0700)]
staging: comedi: cb_pcidas64: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

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>
11 years agostaging: comedi: cb_pcidas64: remove the base_address_regions enum
H Hartley Sweeten [Wed, 10 Apr 2013 18:28:10 +0000 (11:28 -0700)]
staging: comedi: cb_pcidas64: remove the base_address_regions enum

This enum is only used in the ioremap of the PCI resources and it
doesn't really help make the code any clearer.

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>
11 years agostaging: comedi: s626: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:27:50 +0000 (11:27 -0700)]
staging: comedi: s626: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

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>
11 years agostaging: comedi: me_daq: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:27:33 +0000 (11:27 -0700)]
staging: comedi: me_daq: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

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>
11 years agostaging: comedi: gsc_hpdi: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:27:13 +0000 (11:27 -0700)]
staging: comedi: gsc_hpdi: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

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>
11 years agostaging: comedi: gsc_hpdi: remove the base_address_regions enum
H Hartley Sweeten [Wed, 10 Apr 2013 18:26:54 +0000 (11:26 -0700)]
staging: comedi: gsc_hpdi: remove the base_address_regions enum

This enum is only used in the ioremap of the PCI resources and it
doesn't really help make the code any clearer.

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>
11 years agostaging: comedi: daqboard2000: use pci_ioremap_bar()
H Hartley Sweeten [Wed, 10 Apr 2013 18:26:34 +0000 (11:26 -0700)]
staging: comedi: daqboard2000: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI resources. That function
just takes the pci device and a bar number. It also has some
additional sanity checks to make sure the bar is actually a
memory resource.

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>
11 years agostaging: comedi: rti800: use comedi_request_region()
H Hartley Sweeten [Wed, 10 Apr 2013 17:04:54 +0000 (10:04 -0700)]
staging: comedi: rti800: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: acl7225b: use comedi_request_region()
H Hartley Sweeten [Wed, 10 Apr 2013 17:04:32 +0000 (10:04 -0700)]
staging: comedi: acl7225b: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das1800: use __comedi_request_region()
H Hartley Sweeten [Wed, 10 Apr 2013 17:03:59 +0000 (10:03 -0700)]
staging: comedi: das1800: use __comedi_request_region()

Use __comedi_request_region() to request the additional I/O region
used by this driver.

Remove the error message when the request_region() fails,
comedi_request_reqion() will output the error message if necessary.

For aesthetic reasons, rename the local variable 'retval' to
simply 'ret'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_labpc: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:34:36 +0000 (16:34 -0700)]
staging: comedi: ni_labpc: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_labpc: only ISA boards need to request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:34:17 +0000 (16:34 -0700)]
staging: comedi: ni_labpc: only ISA boards need to request_region()

Currently this driver calls request_region() in labpc_common_attach()
which is the common attach function for the ISA, PCMCIA, and PCI
versions of the labpc board.

The PCMCIA support is handled in a separate driver, ni_labpc_cs.
That driver sets the dev->iobase after aquiring the resource and
then just passes it to labpc_common_attach() which then sets
dev->iobase again.

The PCI support, currently in this driver, calls mite_setup() to
aquire the resource and then passes it to labpc_common_attach()
to set the dev->iobase.

The ISA support, also in this driver, passes a user supplied
configuration option to labpc_common_attach() which then does
the request_region() before setting the dev->iobase.

Move the request_region() to the ISA support code in labpc_attach()
and set the dev->iobase there before calling the common attach
code.

For the PCI support, also set the dev->iobase before calling the
common code.

This allows removing the extra parameter from labpc_common_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_labpc: cleanup dev->board_name usage
H Hartley Sweeten [Tue, 9 Apr 2013 23:33:59 +0000 (16:33 -0700)]
staging: comedi: ni_labpc: cleanup dev->board_name usage

The dev->board_name is initialized by the comedi core before calling
the (*attach) or (*auto_attach) functions. It only needs to be updated
if the driver does any additional probing and changes the dev->board_ptr.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_at_ao: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:33:40 +0000 (16:33 -0700)]
staging: comedi: ni_at_ao: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Remove the board attach noise as well as the error message when the
request_region() fails, comedi_request_reqion() will output the error
message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_at_ao: cleanup dev->board_name usage
H Hartley Sweeten [Tue, 9 Apr 2013 23:33:23 +0000 (16:33 -0700)]
staging: comedi: ni_at_ao: cleanup dev->board_name usage

This legacy driver does no additional probing so the dev->board_name
will already be properly initialized by the comedi core before calling
the (*attach) function.

Remove the unnecessary initialization of dev->board_name and use it
when requesting the resources instead of the open-coded strings.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: s526: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:33:04 +0000 (16:33 -0700)]
staging: comedi: s526: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Remove the board attach noise as well as the error message when the
request_region() fails, comedi_request_reqion() will output the error
message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: unionxx5: refactor subdevice init
H Hartley Sweeten [Tue, 9 Apr 2013 23:32:43 +0000 (16:32 -0700)]
staging: comedi: unionxx5: refactor subdevice init

Change the parameters passed to __unioxx5_subdev_init(), we need
the comedi_device pointer to call __comedi_request_region() and
the 'minor' is only used in some kernel noise so remove it. Rename
the parameters 'subdev' and 'subdev_iobase' to simply 's' and
'iobase'.

Use __comedi_request_region() to request the I/O region needed by
the subdevice. Remove the attach noise as well as the error message
when the request_region() fails, comedi_request_reqion() will output
the error message if necessary.

Return -ENOMEM is the kzalloc fails instead of -1.

Fix unioxx5_attach() to use the new parameters to __unioxx5_subdev_init().
Pass on any error codes instead of -1.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:32:24 +0000 (16:32 -0700)]
staging: comedi: comedi_parport: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Remove the noise when the board is first attached as well as the
error message when the request_region() fails, comedi_request_reqion()
will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl818: use __comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:32:03 +0000 (16:32 -0700)]
staging: comedi: pcl818: use __comedi_request_region()

Use __comedi_request_region() to request the additional I/O region
used by this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl816: use __comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:31:44 +0000 (16:31 -0700)]
staging: comedi: pcl816: use __comedi_request_region()

Use __comedi_request_region() to request the additional I/O region
used by this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das16m1: use __comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:31:07 +0000 (16:31 -0700)]
staging: comedi: das16m1: use __comedi_request_region()

Use __comedi_request_region() to request the additional I/O region
used by this driver.

Remove the error message when the request_region() fails,
comedi_request_reqion() will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das16: use __comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:30:48 +0000 (16:30 -0700)]
staging: comedi: das16: use __comedi_request_region()

Use __comedi_request_region() to request the additional I/O region
used by this driver.

Remove the error message when the request_region() fails,
comedi_request_reqion() will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: 8255: use __comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:30:29 +0000 (16:30 -0700)]
staging: comedi: 8255: use __comedi_request_region()

Use __comedi_request_region() to request the I/O regions used by
this driver.

Remove the  error message when the request_region() fails,
comedi_request_reqion() will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: drivers: refactor comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:30:11 +0000 (16:30 -0700)]
staging: comedi: drivers: refactor comedi_request_region()

Split comedi_request_region() into two helper functions.

__comedi_request_region()
Handles the actual request_region() call.

comedi_request_region()
Calls __comedi_request_region() and then sets dev->iobase if the
request was successful.

This allows drivers to use the __comedi_request_region() helper
to handle the request without setting the dev->iobase.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: poc: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:29:50 +0000 (16:29 -0700)]
staging: comedi: poc: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Remove the noise when the board is first attached as well as the
error message when the request_region() fails, comedi_request_reqion()
will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: poc: cleanup dev->board_name usage
H Hartley Sweeten [Tue, 9 Apr 2013 23:29:29 +0000 (16:29 -0700)]
staging: comedi: poc: cleanup dev->board_name usage

This legacy driver does no additional probing so the dev->board_name
will already be properly initialized by the comedi core before calling
the (*attach) function.

Remove the unnecessary initialization of dev->board_name and use it
when requesting the resources instead of the open-coded strings.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: multiq3: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:29:13 +0000 (16:29 -0700)]
staging: comedi: multiq3: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Remove the noise when the board is first attached as well as the
error message when the request_region() fails, comedi_request_reqion()
will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: multiq3: remove usless comment
H Hartley Sweeten [Tue, 9 Apr 2013 23:28:52 +0000 (16:28 -0700)]
staging: comedi: multiq3: remove usless comment

Remove the comment about the configuration options. It's not
correct for this board.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: multiq3: board does not use interrupts
H Hartley Sweeten [Tue, 9 Apr 2013 23:28:35 +0000 (16:28 -0700)]
staging: comedi: multiq3: board does not use interrupts

This driver does not use interruptes. Don't bother parsing the
configuration option from "comedi_config".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: use comedi_request_region()
H Hartley Sweeten [Tue, 9 Apr 2013 23:28:06 +0000 (16:28 -0700)]
staging: comedi: pcmuio: use comedi_request_region()

Use comedi_request_region() to request the I/O region used by this
driver.

Remove the noise when the board is first attached as well as the
error message when the request_region() fails, comedi_request_reqion()
will output the error message if necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: cleanup dev->board_name usage
H Hartley Sweeten [Tue, 9 Apr 2013 23:27:44 +0000 (16:27 -0700)]
staging: comedi: pcmuio: cleanup dev->board_name usage

This legacy driver does no additional probing so the dev->board_name
will already be properly initialized by the comedi core before calling
the (*attach) function.

Remove the unnecessary initialization of dev->board_name.

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