Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1375166

[PATCH 4.4 094/210] staging: comedi: ni_mio_common: fix the ni_write[blw]() functions

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.4 094/210] staging: comedi: ni_mio_common: fix the ni_write[blw]() functions
Date 2016-04-10 22:10 +0200
Message-ID <rmtQf-22e-33@gated-at.bofh.it> (permalink)
References <rmsKu-Wx-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: H Hartley Sweeten <hsweeten@visionengravers.com>

commit bd3a3cd6c27b117fb9a43a38c8072c95332beecc upstream.

Memory mapped io (dev->mmio) should not also be writing to the ioport
(dev->iobase) registers. Add the missing 'else' to these functions.

Fixes: 0953ee4acca0 ("staging: comedi: ni_mio_common: checkpatch.pl cleanup (else not useful)")
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>

---
 drivers/staging/comedi/drivers/ni_mio_common.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -246,24 +246,24 @@ static void ni_writel(struct comedi_devi
 {
 	if (dev->mmio)
 		writel(data, dev->mmio + reg);
-
-	outl(data, dev->iobase + reg);
+	else
+		outl(data, dev->iobase + reg);
 }
 
 static void ni_writew(struct comedi_device *dev, uint16_t data, int reg)
 {
 	if (dev->mmio)
 		writew(data, dev->mmio + reg);
-
-	outw(data, dev->iobase + reg);
+	else
+		outw(data, dev->iobase + reg);
 }
 
 static void ni_writeb(struct comedi_device *dev, uint8_t data, int reg)
 {
 	if (dev->mmio)
 		writeb(data, dev->mmio + reg);
-
-	outb(data, dev->iobase + reg);
+	else
+		outb(data, dev->iobase + reg);
 }
 
 static uint32_t ni_readl(struct comedi_device *dev, int reg)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.4 000/210] 4.4.7-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 025/210] EDAC/sb_edac: Fix computation of channel address Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 043/210] scsi: storvsc: fix SRB_STATUS_ABORTED handling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 006/210] mmc: sh_mmcif: Correct TX DMA channel allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 007/210] x86/microcode/intel: Make early loader look for builtin microcode too Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 026/210] EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 016/210] KVM: VMX: avoid guest hang on invalid invvpid instruction Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 094/210] staging: comedi: ni_mio_common: fix the ni_write[blw]() functions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 009/210] x86/entry/compat: Keep TS_COMPAT set during signal delivery Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 096/210] net: irda: Fix use-after-free in irtty_open() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 092/210] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 085/210] tpm_crb: tpm2_shutdown() must be called before tpm_chip_unregister() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 024/210] sched/preempt, sh: kmap_coherent relies on disabled preemption Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 042/210] sd: Fix discard granularity when LBPRZ=1 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 077/210] crypto: ccp - memset request context to zero during import Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 053/210] usb: hub: fix a typo in hub_port_init() leading to wrong logic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 008/210] x86/microcode: Untangle from BLK_DEV_INITRD Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 051/210] dm: fix rq_end_stats() NULL pointer in dm_requeue_original_request() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 048/210] dm: fix excessive dm-mq context switching Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 076/210] crypto: ccp - Dont assume export/import areas are aligned Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 029/210] s390/pci: enforce fmb page boundary rule Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 091/210] HID: fix hid_ignore_special_drivers module parameter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 022/210] Thermal: Ignore invalid trip points Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 090/210] HID: multitouch: force retrieving of Win8 signature blob Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 047/210] dm snapshot: disallow the COW and origin devices from being identical Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 044/210] be2iscsi: set the boot_kset pointer to NULL in case of failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:10 +0200
  [PATCH 4.4 018/210] perf/core: Fix perf_sched_count derailment Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 001/210] s390/cpumf: Fix lpp detection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 011/210] x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 019/210] perf tools: Dont stop PMU parsing on alias parse error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 014/210] KVM: fix spin_lock_init order on x86 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 017/210] KVM: VMX: fix nested vpid for old KVM guests Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 021/210] perf tools: Fix python extension build Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 012/210] KVM: x86: fix missed hardware breakpoints Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 004/210] ASoC: samsung: pass DMA channels as pointers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 010/210] perf/x86/intel: Add definition for PT PMI bit Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 015/210] KVM: VMX: avoid guest hang on invalid invept instruction Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 005/210] mmc: sh_mmcif: rework dma channel handling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 020/210] perf tools: Fix checking asprintf return value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 002/210] regulator: core: avoid unused variable warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:20 +0200
  [PATCH 4.4 028/210] s390/cpumf: add missing lpp magic initialization Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 182/210] clk: rockchip: add hclk_cpubus to the list of rk3188 critical clocks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 170/210] kbuild/mkspec: fix grub2 installkernel issue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 069/210] ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 073/210] Bluetooth: btusb: Add a new AR3012 ID 13d3:3472 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 188/210] iser-target: Rework connection termination Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 178/210] clk: rockchip: rk3368: fix cpuclk mux bit of big cpu-cluster Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:40 +0200
  [PATCH 4.4 037/210] x86/mm: TLB_REMOTE_SEND_IPI should count pages Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 22:50 +0200
  Re: [PATCH 4.4 159/210] drm/radeon: disable runtime pm on PX laptops  without dGPU power control Michel Dänzer <michel@daenzer.net> - 2016-04-11 04:40 +0200
    Re: [PATCH 4.4 159/210] drm/radeon: disable runtime pm on PX laptops  without dGPU power control Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-12 16:20 +0200
      Re: [PATCH 4.4 159/210] drm/radeon: disable runtime pm on PX laptops  without dGPU power control Michel Dänzer <michel@daenzer.net> - 2016-04-13 06:00 +0200
      Re: [PATCH 4.4 159/210] drm/radeon: disable runtime pm on PX laptops  without dGPU power control Michel Dänzer <michel@daenzer.net> - 2016-04-14 04:50 +0200
        Re: [PATCH 4.4 159/210] drm/radeon: disable runtime pm on PX laptops  without dGPU power control Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-14 16:30 +0200
  Re: [PATCH 4.4 000/210] 4.4.7-stable review Guenter Roeck <linux@roeck-us.net> - 2016-04-11 05:20 +0200
  Re: [PATCH 4.4 000/210] 4.4.7-stable review shuahkh <shuahkh@osg.sisa.samsung.com> - 2016-04-11 19:30 +0200

csiph-web