mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 01:54:00 +00:00
Staging fixes for 3.16-rc6
Here are 2 IIO driver fixes for 3.16-rc6 that resolve some reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlPMHxEACgkQMUfUDdst+ymCLgCfe5O5VyAnDYpmnykiJYFIoKOG f50AoJJEPSMi2chNap5zUlcr+XfcALhG =VS0g -----END PGP SIGNATURE----- Merge tag 'staging-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull more IIO driver fixes from Greg KH: "Here are two IIO driver fixes for 3.16-rc6 that resolve some reported issues" * tag 'staging-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: mma8452: Use correct acceleration units. iio:core: Handle error when mask type is not separate
This commit is contained in:
commit
b7a68369ea
@ -111,8 +111,14 @@ static const int mma8452_samp_freq[8][2] = {
|
||||
{6, 250000}, {1, 560000}
|
||||
};
|
||||
|
||||
/*
|
||||
* Hardware has fullscale of -2G, -4G, -8G corresponding to raw value -2048
|
||||
* The userspace interface uses m/s^2 and we declare micro units
|
||||
* So scale factor is given by:
|
||||
* g * N * 1000000 / 2048 for N = 2, 4, 8 and g=9.80665
|
||||
*/
|
||||
static const int mma8452_scales[3][2] = {
|
||||
{0, 977}, {0, 1953}, {0, 3906}
|
||||
{0, 9577}, {0, 19154}, {0, 38307}
|
||||
};
|
||||
|
||||
static ssize_t mma8452_show_samp_freq_avail(struct device *dev,
|
||||
|
@ -345,6 +345,9 @@ static int iio_device_add_event(struct iio_dev *indio_dev,
|
||||
&indio_dev->event_interface->dev_attr_list);
|
||||
kfree(postfix);
|
||||
|
||||
if ((ret == -EBUSY) && (shared_by != IIO_SEPARATE))
|
||||
continue;
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user