Jason A. Donenfeld [Mon, 10 Aug 2015 15:49:51 +0000 (17:49 +0200)]
staging: ozwpan: Remove from tree
Ozwpan is completely unmaintained and potentially a security problem. As
this is a staging driver, it should be removed, since it has been
abandoned.
Cc: Shigekatsu Tateno <shigekatsu.tateno@atmel.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 10 Aug 2015 16:07:25 +0000 (09:07 -0700)]
Merge 4.2-rc6 into staging-next
We want the IIO and staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 9 Aug 2015 19:54:30 +0000 (15:54 -0400)]
Linux 4.2-rc6
Linus Torvalds [Sun, 9 Aug 2015 07:38:42 +0000 (09:38 +0200)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov:
"Just small ALPS and Elan touchpads, and other driver fixups"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elantech - add special check for fw_version 0x470f01 touchpad
Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning
Input: alps - only Dell laptops have separate button bits for v2 dualpoint sticks
Input: axp20x-pek - add module alias
Input: turbografx - fix potential out of bound access
Linus Torvalds [Sun, 9 Aug 2015 02:59:21 +0000 (05:59 +0300)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
"Another round of MIPS fixes for 4.2. No area does particularly stand
out but we have a two unpleasant ones:
- Kernel ptes are marked with a global bit which allows the kernel to
share kernel TLB entries between all processes. For this to work
both entries of an adjacent even/odd pte pair need to have the
global bit set. There has been a subtle race in setting the other
entry's global bit since ~ 2000 but it take particularly
pathological workloads that essentially do mostly vmalloc/vfree to
trigger this.
This pull request fixes the 64-bit case but leaves the case of 32
bit CPUs with 64 bit ptes unsolved for now. The unfixed cases
affect hardware that is not available in the field yet.
- Instruction emulation requires loading instructions from user space
but the current fast but simplistic approach will fail on pages
that are PROT_EXEC but !PROT_READ. For this reason we temporarily
do not permit this permission and will map pages with PROT_EXEC |
PROT_READ.
The remainder of this pull request is more or less across the field
and the short log explains them well"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: Make set_pte() SMP safe.
MIPS: Replace add and sub instructions in relocate_kernel.S with addiu
MIPS: Flush RPS on kernel entry with EVA
Revert "MIPS: BCM63xx: Provide a plat_post_dma_flush hook"
MIPS: BMIPS: Delete unused Kconfig symbol
MIPS: Export get_c0_perfcount_int()
MIPS: show_stack: Fix stack trace with EVA
MIPS: do_mcheck: Fix kernel code dump with EVA
MIPS: SMP: Don't increment irq_count multiple times for call function IPIs
MIPS: Partially disable RIXI support.
MIPS: Handle page faults of executable but unreadable pages correctly.
MIPS: Malta: Don't reinitialise RTC
MIPS: unaligned: Fix build error on big endian R6 kernels
MIPS: Fix sched_getaffinity with MT FPAFF enabled
MIPS: Fix build with CONFIG_OF=y for non OF-enabled targets
CPUFREQ: Loongson2: Fix broken build due to incorrect include.
Linus Torvalds [Sun, 9 Aug 2015 02:56:31 +0000 (05:56 +0300)]
Merge branch 'for-linus-4.2' of git://git./linux/kernel/git/mason/linux-btrfs
Pull btrfs fix from Chris Mason:
"We have a btrfs quota regression fix.
I merged this one on Thursday and have run it through tests against
current master.
Normally I wouldn't have sent this while you were finalizing rc6, but
I'm feeding mosquitoes in the adirondacks next week, so I wanted to
get this one out before leaving. I'll leave longer tests running and
check on things during the week, but I don't expect any problems"
* 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
btrfs: qgroup: Fix a regression in qgroup reserved space.
Linus Torvalds [Sun, 9 Aug 2015 02:54:27 +0000 (05:54 +0300)]
Merge branch 'for-rc' of git://git./linux/kernel/git/rzhang/linux
Pull thermal management fixes from Zhang Rui:
"Specifics:
- fix an error that "weight_attr" sysfs attribute is not removed
while unbinding. From: Viresh Kumar.
- fix power allocator governor tracing to return the real request.
From Javi Merino.
- remove redundant owner assignment of hisi platform thermal driver.
From Krzysztof Kozlowski.
- a couple of small fixes of Exynos thermal driver. From Krzysztof
Kozlowski and Chanwoo Choi"
* 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
thermal: Drop owner assignment from platform_driver
thermal: exynos: Remove unused code related to platform_data on probe()
thermal: exynos: Add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF
thermal: exynos: Disable the regulator on probe failure
thermal: power_allocator: trace the real requested power
thermal: remove dangling 'weight_attr' device file
Daniel Machon [Sat, 8 Aug 2015 18:43:25 +0000 (20:43 +0200)]
Staging: lustre/lustre/ptlrpc: service.c: Fixed issue with global integer being initialized to 0
Fixed global integer initialization issue.
Global variables should not be explicitly initialized to 0 or NULL.
Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Machon [Sat, 8 Aug 2015 18:34:59 +0000 (20:34 +0200)]
Staging: lustre/lnet/selftest: framework.c: Fixed coding style issues
Fixed coding style issues where statement should be on the next line
Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Machon [Sat, 8 Aug 2015 18:00:07 +0000 (20:00 +0200)]
Staging: wilc1000: wilc_platform.h: Fixed include guard spelling error
Fixed spelling error
Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:36 +0000 (17:41 +0530)]
staging: wilc1000: Remove braces for single statement 'if' and 'else'
Fixes the checkpatch.pl warning - braces {} are not necessary for any arm
of this statement
Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:35 +0000 (17:41 +0530)]
staging: wilc1000: Remove ' ' before quoted '\n'
Fixes the checkpatch.pl warning -
'unnecessary whitespace before a quoted newline'.
Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:34 +0000 (17:41 +0530)]
staging: wilc1000: Remove unused extern declarations
'extern' declarations which are not referenced within the file are
removed.
Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:33 +0000 (17:41 +0530)]
staging: wilc1000: Add space between the braces
Inserted space between nested braces. This fixes the checkpatch.pl
error - space required after that close brace '}'.
Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sat, 8 Aug 2015 01:38:00 +0000 (04:38 +0300)]
Merge tag 'arc-v4.2-rc6-fixes' of git://git./linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta:
"Here's a late pull request for accumulated ARC fixes which came out of
extended testing of the new ARCv2 port with LTP etc. llock/scond
livelock workaround has been reviewed by PeterZ. The changes look a
lot but I've crafted them into finer grained patches for better
tracking later.
I have some more fixes (ARC Futex backend) ready to go but those will
have to wait for tglx to return from vacation.
Summary:
- Enable a reduced config of HS38 (w/o div-rem, ll64...)
- Add software workaround for LLOCK/SCOND livelock
- Fallout of a recent pt_regs update"
* tag 'arc-v4.2-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff
ARC: Make pt_regs regs unsigned
ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle
ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with exponential backoff
ARC: LLOCK/SCOND based rwlock
ARC: LLOCK/SCOND based spin_lock
ARC: refactor atomic inline asm operands with symbolic names
Revert "ARCv2: STAR
9000837815 workaround hardware exclusive transactions livelock"
ARCv2: [axs103_smp] Reduce clk for Quad FPGA configs
ARCv2: Fix the peripheral address space detection
ARCv2: allow selection of page size for MMUv4
ARCv2: lib: memset: Don't assume 64-bit load/stores
ARCv2: lib: memcpy: Missing PREFETCHW
ARCv2: add knob for DIV_REV in Kconfig
ARC/time: Migrate to new 'set-state' interface
Linus Torvalds [Sat, 8 Aug 2015 01:36:40 +0000 (04:36 +0300)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost
Pull virtio fix from Michael Tsirkin:
"A last minute fix for the new virtio input driver. It seems pretty
obvious, and the problem it's fixing would be quite hard to debug"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio-input: reset device and detach unused during remove
Linus Torvalds [Sat, 8 Aug 2015 01:35:14 +0000 (04:35 +0300)]
Merge tag 'dm-4.2-fixes-4' of git://git./linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer:
- stable fix for a dm_merge_bvec() regression on 32 bit Fedora systems.
- fix for a 4.2 DM thinp discard regression due to inability to
properly delete a range of blocks in a data mapping btree.
* tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm btree remove: fix bug in remove_one()
dm: fix dm_merge_bvec regression on 32 bit systems
Linus Torvalds [Sat, 8 Aug 2015 01:33:35 +0000 (04:33 +0300)]
Merge tag 'sound-4.2-rc6' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"The only bulk changes in this request is ABI updates for ASoC topology
API. It's a new API that was introduced in 4.2, and we'd like to
avoid ABI change after the release, so it's taken now. As there is no
real in-tree user for this API, it should be fairly safe.
Other than that, the usual small fixes are found in various drivers:
ASoC cs4265, rt5645, intel-sst, firewire, oxygen and HD-audio"
* tag 'sound-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: topology: Add private data type and bump ABI version to 3
ASoC: topology: Add ops support to byte controls UAPI
ASoC: topology: Update TLV support so we can support more TLV types
ASoC: topology: add private data to manifest
ASoC: topology: Add subsequence in topology
ALSA: hda - one Dell machine needs the headphone white noise fixup
ALSA: fireworks/firewire-lib: add support for recent firmware quirk
Revert "ALSA: fireworks: add support for AudioFire2 quirk"
ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()
ALSA: HDA: Dont check return for snd_hdac_chip_readl
ALSA: HDA: Fix stream assignment for host in decoupled mode
ASoC: rt5645: Fix lost pin setting for DMIC1
ALSA: oxygen: Fix logical-not-parentheses warning
ASoC: Intel: sst_byt: fix initialize 'NULL device *' issue
ASoC: Intel: haswell: fix initialize 'NULL device *' issue
ASoC: cs4265: Fix setting dai format for Left/Right Justified
Linus Torvalds [Sat, 8 Aug 2015 01:30:37 +0000 (04:30 +0300)]
Merge tag 'hwmon-for-linus-v4.2-rc6' of git://git./linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- Export module alias information in g762 and nct7904 to support
auto-loading.
- Blacklist Dell Studio XPS 8100 in dell-smm to fix fan control
problems.
* tag 'hwmon-for-linus-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (g762) Export OF module alias information
hwmon: (nct7904) Export I2C module alias information
hwmon: (dell-smm) Blacklist Dell Studio XPS 8100
Linus Torvalds [Sat, 8 Aug 2015 01:27:51 +0000 (04:27 +0300)]
Merge tag 'usb-4.2-rc6' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are some USB and PHY fixes for 4.2-rc6 that resolve some reported
issues.
All of these have been in the linux-next tree for a while, full
details on the patches are in the shortlog below"
* tag 'usb-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
ARM: dts: dra7: Add syscon-pllreset syscon to SATA PHY
drivers/usb: Delete XHCI command timer if necessary
xhci: fix off by one error in TRB DMA address boundary check
usb: udc: core: add device_del() call to error pathway
phy: ti-pipe3: i783 workaround for SATA lockup after dpll unlock/relock
phy-sun4i-usb: Add missing EXPORT_SYMBOL_GPL for sun4i_usb_phy_set_squelch_detect
USB: sierra: add 1199:68AB device ID
usb: gadget: f_printer: actually limit the number of instances
usb: gadget: f_hid: actually limit the number of instances
usb: gadget: f_uac2: fix calculation of uac2->p_interval
usb: gadget: bdc: fix a driver crash on disconnect
usb: chipidea: ehci_init_driver is intended to call one time
USB: qcserial: Add support for Dell Wireless 5809e 4G Modem
USB: qcserial/option: make AT URCs work for Sierra Wireless MC7305/MC7355
Linus Torvalds [Sat, 8 Aug 2015 01:26:31 +0000 (04:26 +0300)]
Merge tag 'staging-4.2-rc6' of git://git./linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are three bugfixes for some staging driver issues that have been
reported. All have been in the linux-next tree for a while"
* tag 'staging-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: lustre: Include unaligned.h instead of access_ok.h
staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULL
staging: comedi: das1800: add missing break in switch
Linus Torvalds [Sat, 8 Aug 2015 01:25:10 +0000 (04:25 +0300)]
Merge tag 'char-misc-4.2-rc6' of git://git./linux/kernel/git/gregkh/char-misc
Pull char/misc fixes from Greg KH:
"Here are some extcon fixes for 4.2-rc6 that resolve some reported
problems.
All have been in linux-next for a while"
* tag 'char-misc-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
extcon: Fix extcon_cable_get_state() from getting old state after notification
extcon: Fix hang and extcon_get/set_cable_state().
extcon: palmas: Fix NULL pointer error
Linus Torvalds [Sat, 8 Aug 2015 01:18:14 +0000 (04:18 +0300)]
Merge tag 'drm-intel-fixes-2015-08-07' of git://anongit.freedesktop.org/drm-intel
Pull drm fixes from Daniel Vetter:
"One i915 regression fix and a drm core one since Dave's not around,
both introduced in 4.2 so not cc: stable.
The fix for the warning Ted reported isn't in here yet since he didn't
yet supply a tested-by and I can't repro this one myself (it's in
fixup code that needs firmware doing something i915 wouldn't do)"
* tag 'drm-intel-fixes-2015-08-07' of git://anongit.freedesktop.org/drm-intel:
drm/vblank: Use u32 consistently for vblank counters
drm/i915: Allow parsing of variable size child device entries from VBT
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:34 +0000 (16:06 +0530)]
staging: rtl8188eu: remove multiple blank line
Multiple blank lines is against the kernel coding style and checkpatch
complains for that.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:33 +0000 (16:06 +0530)]
staging: rtl8188eu: remove unused function
The function rtw_init_recvframe() was not being used.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:32 +0000 (16:06 +0530)]
staging: rtl8188eu: remove exit label
An exit label which does nothing except return, is not worth having. So
remove it.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:31 +0000 (16:06 +0530)]
staging: rtl8188eu: remove unused define
_RECV_OSDEP_C_ was only defined here but never checked anywhere.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:30 +0000 (16:06 +0530)]
staging: rtl8188eu: rearrange code
Re-arrange the code to directly return success or failure, thus removing
the variable used in the function.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:29 +0000 (16:06 +0530)]
staging: rtl8188eu: make function void
The return value of rtw_os_recv_resource_alloc() is never checked, so
make it as void. Moreover as of now the function can not fail.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:28 +0000 (16:06 +0530)]
staging: rtl8188eu: remove unused argument
The function rtw_os_recv_resource_alloc() only uses the argument
struct recv_frame *. So remove the other unused argument.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 7 Aug 2015 00:02:04 +0000 (09:02 +0900)]
staging: wilc1000: remove WILC_memcmp function
Remove WILC_memcmp function because it is changed to memcmp.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 7 Aug 2015 00:02:03 +0000 (09:02 +0900)]
staging: wilc1000: use memcmp instead of WILC_memcmp
Use memcmp instead of WILC_memcmp.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 7 Aug 2015 00:02:02 +0000 (09:02 +0900)]
staging: wilc1000: remove WILC_memset function
Remove WILC_memset function because it is changed to memset.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 7 Aug 2015 00:02:01 +0000 (09:02 +0900)]
staging: wilc1000: use memset instead of WILC_memset
Use memset instead of WILC_memset.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrzej Hajda [Fri, 7 Aug 2015 07:59:25 +0000 (09:59 +0200)]
staging/lustre: use kmemdup rather than duplicating its implementation
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/
2014320
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:21 +0000 (17:17 -0700)]
staging: rtl8712: change SupportedRates to rates
Change the value to a name that conforms to Linux coding style.
"rates" is equally expressive in this context, and I have left alone
a comment and function name that describe the rates as supported rates.
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:20 +0000 (17:17 -0700)]
staging: rtl8712: remove typedefs
Coding style fix.
Get rid of typedefs NDIS_802_11_RATES and NDIS_802_11_RATES_EX
Undo any casting that was done as a result of the typedef.
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:19 +0000 (17:17 -0700)]
staging: rtl8712: rename function
Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(),
which corresponds to the struct whose size it measures.
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:18 +0000 (17:17 -0700)]
staging: rtl8712: remove duplicate struct
struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex,
and is used about a third as often.
Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex
This also gets rid of a use of typedef NDIS_802_11_RATES_EX
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:17 +0000 (17:17 -0700)]
staging: rtl8712: removed unused wrapper structs
Remove wrapper structs that just wrap struct ndis_wlan_bssid_ex,
and are unused.
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:16 +0000 (17:17 -0700)]
staging: rtl8712: fix comment
The old comment refers to a typedef name which is being removed,
and to a style of calculation which is no longer being used.
It falsely states that IELength is variable length, instead of IEs.
Change comment to simply state that the IEs field is a buffer of
variable size and that IELength refers to the current size.
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:15 +0000 (17:17 -0700)]
staging: rtl8712: simplify size calculation
replace item-by-item size calculation of a struct
with the size of the struct.
This gets rid of a use of typedef NDIS_802_11_RATES_EX
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:06 +0000 (17:34 +0530)]
staging: sm750fb: simplify return
Lets return the return value directly instead of using a variable to
store the result.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:05 +0000 (17:34 +0530)]
staging: sm750fb: rearrange code
Rearrange the code to remove one exit label which also makes the code
less indented and more readable.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:04 +0000 (17:34 +0530)]
staging: sm750fb: fix multiline comment
Multiline comments are edited to be in the kernel coding style.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:03 +0000 (17:34 +0530)]
staging: sm750fb: space around operator
Kernel coding style says to have a space around the operators.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:02 +0000 (17:34 +0530)]
staging: sm750fb: remove multiple blank line
Multiple blank lines are not kernel coding style and so checkpatch
complains. Remove them.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Thu, 6 Aug 2015 00:17:14 +0000 (17:17 -0700)]
staging: rtl8712: fix buggy size calculation
r8712_get_ndis_wlan_bssid_ex_sz has a "6 * sizeof(unsigned long)"
where the underlying struct has a 6 * unsigned char.
Simplify the calculation by just subtracting the variable part from
the size of the struct.
This also gets rid of a use of typedef NDIS_802_11_RATES_EX
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:49:57 +0000 (23:49 +0200)]
Staging: lustre: lnet: Remove unnecessary parentheses on return
Removed three instances of parentheses in return calls that are
unnecessary and do not contribute to readability.
Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:48:48 +0000 (23:48 +0200)]
staging: lustre: Fix space before '[' error
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['
Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:47:41 +0000 (23:47 +0200)]
staging: lustre: Fix space before '(' warnings
Fix several instances of checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:45:50 +0000 (23:45 +0200)]
staging: lustre: Fix space before '++' error
Fix checkpatch.pl error:
ERROR: space prohibited before that '++' (ctx:WxO)
Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:44:36 +0000 (23:44 +0200)]
staging: lustre: Fix code indent error
Fix checkpatch.pl error:
ERROR: code indent should use tabs where possible
Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:43:08 +0000 (23:43 +0200)]
staging: lustre: Unnecessary line continuation
Fix checkpatch.pl warning:
WARNING: Avoid unnecessary line continuations
Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Fri, 7 Aug 2015 01:09:24 +0000 (20:09 -0500)]
staging: fsl-mc: add DPAA2 overview readme
add README file providing an overview of the DPAA2 architecture
and how it is integrated in Linux
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Navy Cheng [Thu, 6 Aug 2015 01:47:57 +0000 (09:47 +0800)]
Staging: vme: remove an unnecessary and wrong warning message
The wrong warning message in vme_user_probe() will mislead developers and
users. As the error message which prompt cdev_add() error already exists,
just remove the unnecessary and wrong message.
Signed-off-by: Navy Cheng <navych@126.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Wed, 5 Aug 2015 20:13:52 +0000 (21:13 +0100)]
staging: octeon: fix coding style warnings for block comments
The Linux kernel coding style suggests starting every line in a block
comment with an asterisk and finishing the block comment with */ on a
separate line. This patch fixes those warnings, clearing all warnings
and errors in this file, as reported by the checkpatch script.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabio Falzoi [Sun, 2 Aug 2015 20:30:14 +0000 (22:30 +0200)]
Staging: fbtft: Use a struct to describe each LCD controller
Use a struct flexfb_lcd_controller to holds chip properties, instead of
relying on a long 'if - else if' chain.
This allows to:
- use a simple linear search to verify if a certain LCD controller
model is supported or not.
- add support for a new LCD chip controller simply defining a new
flexfb_lcd_controller struct.
Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Postma [Fri, 7 Aug 2015 13:04:34 +0000 (14:04 +0100)]
staging: rtl8723au: rtl8723a_hal_init: Improve code readability
This patch improves code readability in the function
rtl8723a_cal_txdesc_chksum. It improves the readability of the argument
of the function le16_to_cpu.
Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Postma [Thu, 6 Aug 2015 11:21:52 +0000 (12:21 +0100)]
staging: rtl8723au: Fix sparse warning: cast to restricted __le16
usPtr is used as __le16 *, but was defined as u16 *.
This was reported by sparse as:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1850:29: warning: cast to
restricted __le16
This patch fixes the type of usPtr.
Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 13:01:15 +0000 (18:31 +0530)]
MAINTAINERS: update maintainers list
Now since sm712fb has moved out of staging update the maintainers list
accordingly.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 13:01:14 +0000 (18:31 +0530)]
Documentation/fb: add documentation for sm712fb
Create the documentation for SM712. Mention all the supported modes and
how to use.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 7 Aug 2015 13:01:13 +0000 (18:31 +0530)]
staging: sm7xxfb: merge sm712fb with fbdev
Now since all cleanups are done and the code is ready to be merged lets
move it out of staging into fbdev location.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:23 +0000 (10:45 -0700)]
staging: comedi: me4000: update MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than "Comedi low-
level 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:22 +0000 (10:45 -0700)]
staging: comedi: me4000: updata driver status in comedi comment
Firmware loading was fixed by:
Commit:
ac584af5
"staging: comedi: me4000: fix firmware downloading"
Change the driver status to "untested" and remove the comments about
the driver being broken,
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:21 +0000 (10:45 -0700)]
staging: comedi: me4000: cleanup multi-line comments
Format the multi-line comments in the kernel CodingStyle.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:20 +0000 (10:45 -0700)]
staging: comedi: me4000: usleep_range is preferred over udelay
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt". `udelay()` is only used in the
firmware upload process. Replace them with `usleep_range()` with a
reasonable upper limit.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:19 +0000 (10:45 -0700)]
staging: comedi: me4000: introduce me4000_ai_get_sample()
The hardware returns two's complement values for the analog input
samples. These need to be converted to the unsigned binary format
that the comedi core expects. Introduce a helper function to handle
this.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:18 +0000 (10:45 -0700)]
staging: comedi: me4000: comedi_handle_events() will stop conversions
The irq handler does not need to manually stop conversions and disable
interrupts when "end-of-acquisition", "error", or "overflow" events are
detected. The comedi_handle_events() will call the subdevice (*cancel)
when these are detected and stop the acquisition.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:17 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up analog output subdevice init
For aesthetics, add some white space to the analog output subdevice
initialization.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:16 +0000 (10:45 -0700)]
staging: comedi: me4000: fix me4000_detach()
There is no real reason to reset the board when detaching. The comedi core
will ensure that any commands are canceled before the detach.
But the PLX interrupts should be disabled.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:15 +0000 (10:45 -0700)]
staging: comedi: me4000: only enable PLX interrupt if we have and irq
Currently me4000_reset() always enables the PLX interrupt. Move the
enable of the interrupt into me4000_auto_attach() and only do the
enable if we actually have and irq.
Make sure the PLX interrupt is disabled in me4000_reset() before we
try to request the irq.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:14 +0000 (10:45 -0700)]
staging: comedi: me4000: introduce me4000_ai_reset()
Introduce a helper function to stop any ai conversions and reset the
ai control register. This consolidates the common code in me4000_reset()
and me4000_ai_cancel().
Use the new helper in the ai (*insn_read) to ensure that the ai control
register is set to a known state after reading the samples.
The ai control register will now always be '0' after the (*cancel) of
a command or doing an (*insn_read). Knowing this the programming of
the register for single acquisition mode in the (*insn_read) can be
simplified.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:13 +0000 (10:45 -0700)]
staging: comedi: me4000: clear the ME4000_AI_CTRL_REG in me4000_reset()
Reset the analog input control register after ensuring that any active
conversions have been stopped. This mimics what the ai subdevice (*cancel)
does.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:12 +0000 (10:45 -0700)]
staging: comedi: me4000: remove unnecessary me4000_ai_cancel()
The comedi core ensures that the subdevice is not busy before it allows
starting a new command. The subdevice (*cancel) is called when the
subdevice is set to not busy. In this driver the me4000_ai_cancel()
is the ai (*cancel) so the extra call in the ai (*do_cmd) is not
necessary. 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:11 +0000 (10:45 -0700)]
staging: comedi: me4000: remove unnecessary ai control register reset
The me4000_ai_cancel() already reset this 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:10 +0000 (10:45 -0700)]
staging: comedi: me4000: fix me4000_ai_cancel()
The STOP and IMMEDIATE_STOP bits in the ME4000_AI_CTRL_REG should be set,
not cleared, to stop any running conversions.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:09 +0000 (10:45 -0700)]
staging: comedi: me4000: return void from me4000_ai_write_chanlist()
This function always returns 0 and the return value is never checked.
Just return 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:08 +0000 (10:45 -0700)]
staging: comedi: me4000: absorb ai_write_timer()
This function is only called by me4000_ai_do_cmd(). 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:07 +0000 (10:45 -0700)]
staging: comedi: me4000: absorb ai_prepare()
This function never fails and it's only called by me4000_ai_do_cmd().
Absorb it and remove the unnecessary failure 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:06 +0000 (10:45 -0700)]
staging: comedi: me4000: simplify ai_prepare()
The ai (*do_cmd_test) validates the trigger sources in Step 2b to ensure
that they are compatible. Save the 'ai_ctrl_mode' that will be used in the
private data so that ai_prepare(), which is called by the ai (*do_cmd),
does not have to recheck the sources in order to figure it out.
Also, tidy up the stop trigger checks so that the ME4000_AI_CTRL_HF_IRQ
bit is set in the common code path.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:05 +0000 (10:45 -0700)]
staging: comedi: me4000: move ai command timing values into private data
The ai (*do_cmd_test) calls me4000_ai_round_cmd_args() to calculate the
timing values needed to the command. The the command test passes, the
core will then call the ai (*do_cmd) which then has to call
me4000_ai_round_cmd_args() again in order to get the same values to
pass to ai_prepare() in order to program the timing.
Add members to the private data to allow the (*do_cmd_test) to calculate
and save to values needed by ai_prepare().
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:04 +0000 (10:45 -0700)]
staging: comedi: me4000: return void from ai_round_cmd_args()
This function always succeeds. Change the return type to void and
remove the unnecessary error check in me4000_ai_do_cmd().
Move the function call in me4000_ai_do_cmd_test() from before Step 1
to Step 3 where the arguments are validated. There is no reason to
get the values if the previous steps fail.
Rename the function so it has namespace associated with 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:03 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_DIO_CTRL_REG bit defines
Use the BIT() marco to define the bits of this register.
For aesthetics, rename all the defines to remove the '_BIT' from the
name.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:02 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_AO_CTRL_REG bit defines
Use the BIT() marco to define the bits of this register.
For aesthetics, rename all the defines to remove the '_BIT' from the
name.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:01 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_AO_STATUS_REG bit defines
Use the BIT() marco to define the bits of this register.
For aesthetics, rename all the defines to remove the '_BIT' from the
name.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:45:00 +0000 (10:45 -0700)]
staging: comedi: me4000: tidy up ME4000_IRQ_STATUS_REG bit defines
Use the BIT() marco to define the bits of this register.
For aesthetics, rename all the defines to remove the '_BIT' from the
name.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:59 +0000 (10:44 -0700)]
staging: comedi: me4000: tidy up ME4000_AI_CTRL_REG bit defines
Use the BIT() marco to define the bits of this register.
For aesthetics, rename all the defines to remove the '_BIT' from the
name.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:58 +0000 (10:44 -0700)]
staging: comedi: me4000: tidy up ME4000_AI_STATUS_REG bit defines
Use the BIT() marco to define the bits of this register.
For aesthetics, rename all the defines to remove the '_BIT' from the
name. Also, use ME4000_AI_STATUS_REG instead of ME4000_AI_CTRL_REG
when reading the register (they happen to be the same).
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:57 +0000 (10:44 -0700)]
staging: comedi: me4000: use comedi_range_is_bipolar() in ai (*insn_read)
Use the helper function to check the range type instead of relying on the
value. For aesthetics, rename the local variable used for the range.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:56 +0000 (10:44 -0700)]
staging: comedi: me4000: use correct types for extracted chanspec values
The chanspec channel, range, and aref are unsigned int values. Use the
correct types when extracting them.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:55 +0000 (10:44 -0700)]
staging: comedi: me4000: fix me4000_ai_insn_read()
The coemdi (*insn_read) functions are supposed to read insn->n values
from the hardware. Make this function work like the core expects.
Use the comedi_offset_munge() helper to munge the two's complement
values to offset binary.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:54 +0000 (10:44 -0700)]
staging: comedi: me4000: use comedi_timeout() to wait for ai (*insn_read)
Use the comedi_timeout() helper to busy-wait for the analog input end-of-
conversion instead of the udelay().
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:53 +0000 (10:44 -0700)]
staging: comedi: me4000: tidy up ME4000_AI_CHANNEL_LIST_REG bit defines
Use the BIT() macro to define the bits of this 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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:52 +0000 (10:44 -0700)]
staging: comedi: me4000: fix ai_write_chanlist()
Rename this function so it has namespace associated with the driver.
The last entry of the chanlist needs the ME4000_AI_LIST_LAST_ENTRY bit
set to end the list. Fix the function and tidy if up a bit.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:51 +0000 (10:44 -0700)]
staging: comedi: me4000: simplify analog input range programming
The comedi_lrange table for the analog inputs is inverted compared
to the values that need to be written to the ME4000_AI_CHANNEL_LIST_REG
to select the range.
Create a macro, ME4000_AI_LIST_RANGE(), to handle the inversion. Remove
the old defines and simplify the code a bit.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:50 +0000 (10:44 -0700)]
staging: comedi: me4000: remove unnecessary ME4000_AI_LIST_INPUT_SINGLE_ENDED
This define evaluates to 0 and is OR'ed with the 'entry' value that is
written to the ME4000_AI_CHANNEL_LIST_REG when the channel aref is a
single-ended type (AREF_GROUND or AREF_COMMON). OR'ing a zero value is
pretty silly, just remove it.
Remove the switch() in me4000_ai_insn_read() to simplify the code.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:49 +0000 (10:44 -0700)]
staging: comedi: me4000: rename local variables used for 'dev->private'
In comedi drivers the local variable used for the dev->private pointer is
normally named 'devpriv'. For aesthetics, rename the variables in this
driver. Also, rename the struct to follow the norm.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:48 +0000 (10:44 -0700)]
staging: comedi: me4000: refactor 'ai_sh_nchan' boardinfo
Some of the boards supported by this driver can do analog input sample &
hold on 8 of the channels. The 'ai_sh_nchan' member of the boardinfo is
used to indicate which boards support this feature. To save a bit of space,
convert this member to a bit-field, 'can_do_sh_ai'. Note, this feature is
not currently supported.
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>
H Hartley Sweeten [Wed, 5 Aug 2015 17:44:47 +0000 (10:44 -0700)]
staging: comedi: me4000: refactor 'ao_fifo' boardinfo
This member of the boardinfo is always '4' for the boards that have an
analog output FIFO. Covert it to a bit-field, 'has_ao_fifo', to save a
bit of space.
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>