OpenCloudOS-Kernel/drivers
Irina Tirdea cd62322a97 iio: accel: mma9553: fix endianness issue when reading status
Refactor code for simplicity and clarity.

This also fixes an endianness issue with the original code.
When reading multiple registers, the received buffer of
16-bytes words is little endian (status, step count). On
big endian machines, casting them to u32 would result in
reversed order in the buffer (step count, status) leading
to incorrect values for step count and activity.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-04-26 19:39:42 +01:00
..
accessibility
acpi Revert "x86/PCI: Refine the way to release PCI IRQ resources" 2015-03-20 14:56:19 +01:00
amba ARM: 8256/1: driver coamba: add device binding path 'driver_override' 2015-02-10 10:23:15 +00:00
android android: binder: fix binder mmap failures 2015-03-01 18:43:51 -08:00
ata libata: Blacklist queued TRIM on Samsung SSD 850 Pro 2015-03-27 15:22:46 -04:00
atm atm: remove deprecated use of pci api 2015-01-18 00:28:41 -05:00
auxdisplay
base regmap: Fix for v4.0 2015-03-24 16:42:54 -07:00
bcma bcma: implement host code support for PCIe Gen 2 devices 2015-01-29 10:54:43 +02:00
block NVMe: Initialize device list head before starting 2015-03-23 09:35:12 -06:00
bluetooth Bluetooth: btusb: Fix issue with CSR based Intel Wireless controllers 2015-02-23 09:30:35 +02:00
bus ARM: SoC platform changes 2015-02-17 09:27:54 -08:00
cdrom
char Not entirely surprising: the ongoing QEMU work on virtio 1.0 has revealed 2015-03-17 10:36:01 -07:00
clk The clk fixes for 4.0-rc4 comprise three themes. First are the usual 2015-03-15 15:07:08 -07:00
clocksource clocksource/drivers/sun5i: Fix cpufreq interaction with sched_clock() 2015-03-26 10:59:40 +01:00
connector
coresight coresight: fix function etm_writel_cp14() parameter order 2015-02-04 10:42:55 -08:00
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 2015-03-06 13:43:33 -08:00
cpuidle cpuidle: mvebu: Update cpuidle thresholds for Armada XP SOCs 2015-03-13 18:31:29 +01:00
crypto Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-02-18 08:49:20 -08:00
dca
devfreq Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools' 2015-02-13 21:39:06 +01:00
dio
dma Merge 4.0-rc7 into staging-next 2015-04-07 11:03:02 +02:00
dma-buf reservation: Remove shadowing local variable 'ret' 2015-01-22 16:29:31 +05:30
edac * A fix to sb_edac for proper detection on SNB machines 2015-02-19 11:18:14 -08:00
eisa
extcon extcon: max77693: Constify struct regmap_config 2015-01-26 13:47:55 +09:00
firewire firewire: core: use correct vendor/model IDs 2015-02-02 21:56:03 +01:00
firmware * Fix integer overflow issue in the DMI SMBIOS 3.0 code when 2015-03-31 10:45:47 +02:00
fmc
gpio gpio: syscon: reduce message level when direction reg offset not in dt 2015-03-27 11:17:08 +01:00
gpu Merge branch 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2015-04-03 09:28:55 +10:00
hid HID: wacom: check for wacom->shared before following the pointer 2015-03-17 20:59:55 +01:00
hsi
hv Char / Misc patches for 3.20-rc1 2015-02-15 10:48:44 -08:00
hwmon hwmon: (ads7828) Check return value of devm_regmap_init_i2c 2015-02-22 20:10:30 -08:00
hwspinlock
i2c Revert "i2c: core: Dispose OF IRQ mapping at client removal time" 2015-03-12 10:23:05 +01:00
ide ide_tape: convert jiffies with jiffies_to_msecs 2015-03-18 23:25:57 -04:00
idle intel_idle: Add ->enter_freeze callbacks 2015-02-15 19:40:09 +01:00
iio iio: accel: mma9553: fix endianness issue when reading status 2015-04-26 19:39:42 +01:00
infiniband IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic 2015-04-02 09:53:59 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-04-06 14:10:08 -07:00
iommu iommu/vt-d: Remove unused variable 2015-03-24 15:39:26 +01:00
ipack
irqchip Merge branch 'irqchip/urgent-gic' into irqchip/urgent 2015-03-29 19:34:05 +00:00
isdn isdn: icn: use strlcpy() when parsing setup options 2015-03-15 22:24:37 -04:00
leds leds: leds-gpio: Pass on error codes unmodified 2015-02-02 14:36:10 -08:00
lguest lguest: now needs PCI_DIRECT. 2015-04-01 10:29:05 -07:00
macintosh
mailbox Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2015-02-11 12:56:40 -08:00
mcb mcb: Fix error path of mcb_pci_probe 2015-02-03 15:48:51 -08:00
md . Fix DM core device cleanup regression -- due to a latent race that was 2015-03-26 14:53:47 -07:00
media mm: gup: use get_user_pages_unlocked 2015-02-11 17:06:05 -08:00
memory memory/fsl-corenet-cf: Add t1040 support 2015-01-29 22:57:43 -06:00
memstick
message i2o: move to staging 2015-02-03 15:58:39 -08:00
mfd mfd: kempld-core: Fix callback return value check 2015-03-12 09:27:58 +00:00
misc mei: make device disabled on stop unconditionally 2015-03-01 19:34:50 -08:00
mmc mmc: pwrseq_simple: fix error path in mmc_pwrseq_simple_alloc 2015-03-19 11:26:35 +01:00
mtd This pull request fixes a bug introduced during the v4.0 merge window where we 2015-03-21 10:36:44 -07:00
net net/mlx4_core: Fix error message deprecation for ConnectX-2 cards 2015-04-06 17:32:27 -04:00
nfc NFC: nci: Move NFCEE discovery logic 2015-02-04 09:15:18 +01:00
ntb
nubus
of drivers/of: Add empty ranges quirk for PA-Semi 2015-03-27 19:31:16 -07:00
oprofile
parisc parisc/PCI: Clip bridge windows to fit in upstream windows 2015-01-16 10:04:43 -06:00
parport parport: parport_atari: Remove obsolete IRQ_TYPE_SLOW 2015-01-15 13:44:50 +01:00
pci PCI updates for v4.0: 2015-03-12 09:45:46 -07:00
pcmcia Revert "pcmcia: add a new resource manager for non ISA systems" 2015-03-11 14:21:23 +01:00
phy phy: omap-usb2: Fix missing clk_prepare call when using old dt name 2015-03-13 17:14:39 +05:30
pinctrl pinctrl: sun4i: GPIOs configured as irq must be set to input before reading 2015-03-18 10:56:46 +01:00
platform Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-21 11:12:07 -08:00
pnp Merge branches 'pnp', 'pm-cpuidle' and 'pm-cpufreq' 2015-02-21 04:29:16 +01:00
power power_supply: 88pm860x: Fix leaked power supply on probe fail 2015-01-28 15:08:10 +01:00
powercap powercap / RAPL: handle domains with different energy units 2015-03-13 23:18:44 +01:00
pps
ps3 powerpc/ps3: Fix sys-manager-core sparse warnings 2015-01-22 17:31:21 +11:00
ptp
pwm pwm: tegra: Use NSEC_PER_SEC 2015-02-18 08:40:29 +01:00
rapidio Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-02-18 08:49:20 -08:00
ras
regulator Merge remote-tracking branches 'regulator/fix/doc' and 'regulator/fix/palmas' into regulator-linus 2015-03-23 11:43:42 -07:00
remoteproc
reset reset: sunxi: fix spinlock initialization 2015-01-16 19:11:31 -08:00
rpmsg virtio_rpmsg: set DRIVER_OK before using device 2015-03-13 15:55:42 +10:30
rtc drivers/rtc/rtc-mrst: fix suspend/resume 2015-03-25 16:20:30 -07:00
s390 s390/dcss: array index 'i' is used before limits check. 2015-02-26 09:24:48 +01:00
sbus
scsi Merge branch 'for-4.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-03-24 17:08:29 -07:00
sfi
sh drivers: sh: Disable PM runtime for multi-platform r8a7740 with genpd 2015-02-24 07:26:12 +09:00
sn
soc ARM: SoC driver updates 2015-02-17 09:38:59 -08:00
spi Merge remote-tracking branches 'spi/fix/dw', 'spi/fix/queue' and 'spi/fix/qup' into spi-linus 2015-03-24 10:38:44 -07:00
spmi
ssb treewide: Remove unnecessary SSB_DEVTABLE_END macro 2015-02-11 14:38:29 -08:00
staging Merge 4.0-rc7 into staging-next 2015-04-07 11:03:02 +02:00
target target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 2015-03-19 23:26:46 -07:00
tc
thermal thermal: Make sysfs attributes of cooling devices default attributes 2015-03-05 01:47:57 -04:00
thunderbolt
tty tty: serial: fsl_lpuart: clear receive flag on FIFO flush 2015-03-26 23:13:14 +01:00
uio
usb USB-serial fixes for v4.0-rc6 2015-04-01 13:42:58 +02:00
uwb USB patches for 3.20-rc1 2015-02-15 10:24:55 -08:00
vfio vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX 2015-03-12 09:51:38 -06:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-03-21 11:24:38 -07:00
video OMAPDSS: fix regression with display sysfs files 2015-02-26 10:23:15 +02:00
virt
virtio virtio_mmio: fix access width for mmio 2015-03-17 12:12:21 +10:30
vlynq
vme vme: tsi148: Master windows support USERx and CR/CSR accesses, not slaves 2015-03-06 17:03:22 -08:00
w1
watchdog watchdog: imgpdc: Fix default heartbeat 2015-03-27 08:47:50 +01:00
xen xen: regression fixes for 4.0-rc6 2015-04-02 13:53:53 -07:00
zorro
Kconfig i2o: move to staging 2015-02-03 15:58:39 -08:00
Makefile