Char/Misc driver fixes for 6.1-rc6
Here are some small char/misc and other driver fixes for 6.1-rc6 to resolve some reported problems. Included in here are: - iio driver fixes - binder driver fix - nvmem driver fix - vme_vmci information leak fix - parport fix - slimbus configuration fix - coreboot firmware bugfix - speakup build fix and crash fix All of these have been in linux-next for a while with no reported issues Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCY3dKsA8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ylGbACgiR6Eq+qo8A1GWq5nb5LN0LQyj4EAn1C8ra8B 4r8su1o5PKEJgr2AvTYb =4U4M -----END PGP SIGNATURE----- Merge tag 'char-misc-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc and other driver fixes for 6.1-rc6 to resolve some reported problems. Included in here are: - iio driver fixes - binder driver fix - nvmem driver fix - vme_vmci information leak fix - parport fix - slimbus configuration fix - coreboot firmware bugfix - speakup build fix and crash fix All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (22 commits) firmware: coreboot: Register bus in module init nvmem: u-boot-env: fix crc32_data_offset on redundant u-boot-env slimbus: qcom-ngd: Fix build error when CONFIG_SLIM_QCOM_NGD_CTRL=y && CONFIG_QCOM_RPROC_COMMON=m docs: update mediator contact information in CoC doc slimbus: stream: correct presence rate frequencies nvmem: lan9662-otp: Fix compatible string binder: validate alloc->mm in ->mmap() handler parport_pc: Avoid FIFO port location truncation siox: fix possible memory leak in siox_device_add() misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() speakup: replace utils' u_char with unsigned char speakup: fix a segfault caused by switching consoles tools: iio: iio_generic_buffer: Fix read size iio: imu: bno055: uninitialized variable bug in bno055_trigger_handler() iio: adc: at91_adc: fix possible memory leak in at91_adc_allocate_trigger() iio: adc: mp2629: fix potential array out of bound access iio: adc: mp2629: fix wrong comparison of channel iio: pressure: ms5611: changed hardcoded SPI speed to value limited iio: pressure: ms5611: fixed value compensation bug iio: accel: bma400: Ensure VDDIO is enable defore reading the chip ID. ...
This commit is contained in:
commit
1f63d1a106
22 changed files with 111 additions and 75 deletions
|
@ -51,7 +51,7 @@ the Technical Advisory Board (TAB) or other maintainers if you're
|
||||||
uncertain how to handle situations that come up. It will not be
|
uncertain how to handle situations that come up. It will not be
|
||||||
considered a violation report unless you want it to be. If you are
|
considered a violation report unless you want it to be. If you are
|
||||||
uncertain about approaching the TAB or any other maintainers, please
|
uncertain about approaching the TAB or any other maintainers, please
|
||||||
reach out to our conflict mediator, Joanna Lee <joanna.lee@gesmer.com>.
|
reach out to our conflict mediator, Joanna Lee <jlee@linuxfoundation.org>.
|
||||||
|
|
||||||
In the end, "be kind to each other" is really what the end goal is for
|
In the end, "be kind to each other" is really what the end goal is for
|
||||||
everybody. We know everyone is human and we all fail at times, but the
|
everybody. We know everyone is human and we all fail at times, but the
|
||||||
|
|
|
@ -1778,7 +1778,7 @@ static void speakup_con_update(struct vc_data *vc)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (!speakup_console[vc->vc_num] || spk_parked)
|
if (!speakup_console[vc->vc_num] || spk_parked || !synth)
|
||||||
return;
|
return;
|
||||||
if (!spin_trylock_irqsave(&speakup_info.spinlock, flags))
|
if (!spin_trylock_irqsave(&speakup_info.spinlock, flags))
|
||||||
/* Speakup output, discard */
|
/* Speakup output, discard */
|
||||||
|
|
|
@ -54,7 +54,7 @@ static inline int oops(const char *msg, const char *info)
|
||||||
|
|
||||||
static inline struct st_key *hash_name(char *name)
|
static inline struct st_key *hash_name(char *name)
|
||||||
{
|
{
|
||||||
u_char *pn = (u_char *)name;
|
unsigned char *pn = (unsigned char *)name;
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
|
|
||||||
while (*pn) {
|
while (*pn) {
|
||||||
|
|
|
@ -739,6 +739,12 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
|
||||||
const char *failure_string;
|
const char *failure_string;
|
||||||
struct binder_buffer *buffer;
|
struct binder_buffer *buffer;
|
||||||
|
|
||||||
|
if (unlikely(vma->vm_mm != alloc->mm)) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
failure_string = "invalid vma->vm_mm";
|
||||||
|
goto err_invalid_mm;
|
||||||
|
}
|
||||||
|
|
||||||
mutex_lock(&binder_alloc_mmap_lock);
|
mutex_lock(&binder_alloc_mmap_lock);
|
||||||
if (alloc->buffer_size) {
|
if (alloc->buffer_size) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
|
@ -785,6 +791,7 @@ err_alloc_pages_failed:
|
||||||
alloc->buffer_size = 0;
|
alloc->buffer_size = 0;
|
||||||
err_already_mapped:
|
err_already_mapped:
|
||||||
mutex_unlock(&binder_alloc_mmap_lock);
|
mutex_unlock(&binder_alloc_mmap_lock);
|
||||||
|
err_invalid_mm:
|
||||||
binder_alloc_debug(BINDER_DEBUG_USER_ERROR,
|
binder_alloc_debug(BINDER_DEBUG_USER_ERROR,
|
||||||
"%s: %d %lx-%lx %s failed %d\n", __func__,
|
"%s: %d %lx-%lx %s failed %d\n", __func__,
|
||||||
alloc->pid, vma->vm_start, vma->vm_end,
|
alloc->pid, vma->vm_start, vma->vm_end,
|
||||||
|
|
|
@ -149,12 +149,8 @@ static int coreboot_table_probe(struct platform_device *pdev)
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = bus_register(&coreboot_bus_type);
|
ret = coreboot_table_populate(dev, ptr);
|
||||||
if (!ret) {
|
|
||||||
ret = coreboot_table_populate(dev, ptr);
|
|
||||||
if (ret)
|
|
||||||
bus_unregister(&coreboot_bus_type);
|
|
||||||
}
|
|
||||||
memunmap(ptr);
|
memunmap(ptr);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -169,7 +165,6 @@ static int __cb_dev_unregister(struct device *dev, void *dummy)
|
||||||
static int coreboot_table_remove(struct platform_device *pdev)
|
static int coreboot_table_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister);
|
bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister);
|
||||||
bus_unregister(&coreboot_bus_type);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,6 +194,32 @@ static struct platform_driver coreboot_table_driver = {
|
||||||
.of_match_table = of_match_ptr(coreboot_of_match),
|
.of_match_table = of_match_ptr(coreboot_of_match),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(coreboot_table_driver);
|
|
||||||
|
static int __init coreboot_table_driver_init(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = bus_register(&coreboot_bus_type);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = platform_driver_register(&coreboot_table_driver);
|
||||||
|
if (ret) {
|
||||||
|
bus_unregister(&coreboot_bus_type);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit coreboot_table_driver_exit(void)
|
||||||
|
{
|
||||||
|
platform_driver_unregister(&coreboot_table_driver);
|
||||||
|
bus_unregister(&coreboot_bus_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(coreboot_table_driver_init);
|
||||||
|
module_exit(coreboot_table_driver_exit);
|
||||||
|
|
||||||
MODULE_AUTHOR("Google, Inc.");
|
MODULE_AUTHOR("Google, Inc.");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
|
@ -869,18 +869,6 @@ static int bma400_init(struct bma400_data *data)
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Try to read chip_id register. It must return 0x90. */
|
|
||||||
ret = regmap_read(data->regmap, BMA400_CHIP_ID_REG, &val);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(data->dev, "Failed to read chip id register\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val != BMA400_ID_REG_VAL) {
|
|
||||||
dev_err(data->dev, "Chip ID mismatch\n");
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
data->regulators[BMA400_VDD_REGULATOR].supply = "vdd";
|
data->regulators[BMA400_VDD_REGULATOR].supply = "vdd";
|
||||||
data->regulators[BMA400_VDDIO_REGULATOR].supply = "vddio";
|
data->regulators[BMA400_VDDIO_REGULATOR].supply = "vddio";
|
||||||
ret = devm_regulator_bulk_get(data->dev,
|
ret = devm_regulator_bulk_get(data->dev,
|
||||||
|
@ -906,6 +894,18 @@ static int bma400_init(struct bma400_data *data)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/* Try to read chip_id register. It must return 0x90. */
|
||||||
|
ret = regmap_read(data->regmap, BMA400_CHIP_ID_REG, &val);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(data->dev, "Failed to read chip id register\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val != BMA400_ID_REG_VAL) {
|
||||||
|
dev_err(data->dev, "Chip ID mismatch\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
ret = bma400_get_power_mode(data);
|
ret = bma400_get_power_mode(data);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(data->dev, "Failed to get the initial power-mode\n");
|
dev_err(data->dev, "Failed to get the initial power-mode\n");
|
||||||
|
|
|
@ -2307,11 +2307,9 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st,
|
||||||
clb->p6 = buf[AT91_ADC_TS_CLB_IDX_P6];
|
clb->p6 = buf[AT91_ADC_TS_CLB_IDX_P6];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We prepare here the conversion to milli and also add constant
|
* We prepare here the conversion to milli to avoid doing it on hotpath.
|
||||||
* factor (5 degrees Celsius) to p1 here to avoid doing it on
|
|
||||||
* hotpath.
|
|
||||||
*/
|
*/
|
||||||
clb->p1 = clb->p1 * 1000 + 5000;
|
clb->p1 = clb->p1 * 1000;
|
||||||
|
|
||||||
free_buf:
|
free_buf:
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
|
|
@ -634,8 +634,10 @@ static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *idev,
|
||||||
trig->ops = &at91_adc_trigger_ops;
|
trig->ops = &at91_adc_trigger_ops;
|
||||||
|
|
||||||
ret = iio_trigger_register(trig);
|
ret = iio_trigger_register(trig);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
iio_trigger_free(trig);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return trig;
|
return trig;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,8 @@ static struct iio_map mp2629_adc_maps[] = {
|
||||||
MP2629_MAP(SYSTEM_VOLT, "system-volt"),
|
MP2629_MAP(SYSTEM_VOLT, "system-volt"),
|
||||||
MP2629_MAP(INPUT_VOLT, "input-volt"),
|
MP2629_MAP(INPUT_VOLT, "input-volt"),
|
||||||
MP2629_MAP(BATT_CURRENT, "batt-current"),
|
MP2629_MAP(BATT_CURRENT, "batt-current"),
|
||||||
MP2629_MAP(INPUT_CURRENT, "input-current")
|
MP2629_MAP(INPUT_CURRENT, "input-current"),
|
||||||
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mp2629_read_raw(struct iio_dev *indio_dev,
|
static int mp2629_read_raw(struct iio_dev *indio_dev,
|
||||||
|
@ -74,7 +75,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev,
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (chan->address == MP2629_INPUT_VOLT)
|
if (chan->channel == MP2629_INPUT_VOLT)
|
||||||
rval &= GENMASK(6, 0);
|
rval &= GENMASK(6, 0);
|
||||||
*val = rval;
|
*val = rval;
|
||||||
return IIO_VAL_INT;
|
return IIO_VAL_INT;
|
||||||
|
|
|
@ -632,7 +632,7 @@ static int bno055_set_regmask(struct bno055_priv *priv, int val, int val2,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
delta = abs(tbl_val - req_val);
|
delta = abs(tbl_val - req_val);
|
||||||
if (delta < best_delta || first) {
|
if (first || delta < best_delta) {
|
||||||
best_delta = delta;
|
best_delta = delta;
|
||||||
hwval = i;
|
hwval = i;
|
||||||
first = false;
|
first = false;
|
||||||
|
|
|
@ -25,13 +25,6 @@ enum {
|
||||||
MS5607,
|
MS5607,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ms5611_chip_info {
|
|
||||||
u16 prom[MS5611_PROM_WORDS_NB];
|
|
||||||
|
|
||||||
int (*temp_and_pressure_compensate)(struct ms5611_chip_info *chip_info,
|
|
||||||
s32 *temp, s32 *pressure);
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OverSampling Rate descriptor.
|
* OverSampling Rate descriptor.
|
||||||
* Warning: cmd MUST be kept aligned on a word boundary (see
|
* Warning: cmd MUST be kept aligned on a word boundary (see
|
||||||
|
@ -50,12 +43,15 @@ struct ms5611_state {
|
||||||
const struct ms5611_osr *pressure_osr;
|
const struct ms5611_osr *pressure_osr;
|
||||||
const struct ms5611_osr *temp_osr;
|
const struct ms5611_osr *temp_osr;
|
||||||
|
|
||||||
|
u16 prom[MS5611_PROM_WORDS_NB];
|
||||||
|
|
||||||
int (*reset)(struct ms5611_state *st);
|
int (*reset)(struct ms5611_state *st);
|
||||||
int (*read_prom_word)(struct ms5611_state *st, int index, u16 *word);
|
int (*read_prom_word)(struct ms5611_state *st, int index, u16 *word);
|
||||||
int (*read_adc_temp_and_pressure)(struct ms5611_state *st,
|
int (*read_adc_temp_and_pressure)(struct ms5611_state *st,
|
||||||
s32 *temp, s32 *pressure);
|
s32 *temp, s32 *pressure);
|
||||||
|
|
||||||
struct ms5611_chip_info *chip_info;
|
int (*compensate_temp_and_pressure)(struct ms5611_state *st, s32 *temp,
|
||||||
|
s32 *pressure);
|
||||||
struct regulator *vdd;
|
struct regulator *vdd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ static int ms5611_read_prom(struct iio_dev *indio_dev)
|
||||||
struct ms5611_state *st = iio_priv(indio_dev);
|
struct ms5611_state *st = iio_priv(indio_dev);
|
||||||
|
|
||||||
for (i = 0; i < MS5611_PROM_WORDS_NB; i++) {
|
for (i = 0; i < MS5611_PROM_WORDS_NB; i++) {
|
||||||
ret = st->read_prom_word(st, i, &st->chip_info->prom[i]);
|
ret = st->read_prom_word(st, i, &st->prom[i]);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&indio_dev->dev,
|
dev_err(&indio_dev->dev,
|
||||||
"failed to read prom at %d\n", i);
|
"failed to read prom at %d\n", i);
|
||||||
|
@ -93,7 +93,7 @@ static int ms5611_read_prom(struct iio_dev *indio_dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ms5611_prom_is_valid(st->chip_info->prom, MS5611_PROM_WORDS_NB)) {
|
if (!ms5611_prom_is_valid(st->prom, MS5611_PROM_WORDS_NB)) {
|
||||||
dev_err(&indio_dev->dev, "PROM integrity check failed\n");
|
dev_err(&indio_dev->dev, "PROM integrity check failed\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -114,21 +114,20 @@ static int ms5611_read_temp_and_pressure(struct iio_dev *indio_dev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return st->chip_info->temp_and_pressure_compensate(st->chip_info,
|
return st->compensate_temp_and_pressure(st, temp, pressure);
|
||||||
temp, pressure);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ms5611_temp_and_pressure_compensate(struct ms5611_chip_info *chip_info,
|
static int ms5611_temp_and_pressure_compensate(struct ms5611_state *st,
|
||||||
s32 *temp, s32 *pressure)
|
s32 *temp, s32 *pressure)
|
||||||
{
|
{
|
||||||
s32 t = *temp, p = *pressure;
|
s32 t = *temp, p = *pressure;
|
||||||
s64 off, sens, dt;
|
s64 off, sens, dt;
|
||||||
|
|
||||||
dt = t - (chip_info->prom[5] << 8);
|
dt = t - (st->prom[5] << 8);
|
||||||
off = ((s64)chip_info->prom[2] << 16) + ((chip_info->prom[4] * dt) >> 7);
|
off = ((s64)st->prom[2] << 16) + ((st->prom[4] * dt) >> 7);
|
||||||
sens = ((s64)chip_info->prom[1] << 15) + ((chip_info->prom[3] * dt) >> 8);
|
sens = ((s64)st->prom[1] << 15) + ((st->prom[3] * dt) >> 8);
|
||||||
|
|
||||||
t = 2000 + ((chip_info->prom[6] * dt) >> 23);
|
t = 2000 + ((st->prom[6] * dt) >> 23);
|
||||||
if (t < 2000) {
|
if (t < 2000) {
|
||||||
s64 off2, sens2, t2;
|
s64 off2, sens2, t2;
|
||||||
|
|
||||||
|
@ -154,17 +153,17 @@ static int ms5611_temp_and_pressure_compensate(struct ms5611_chip_info *chip_inf
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ms5607_temp_and_pressure_compensate(struct ms5611_chip_info *chip_info,
|
static int ms5607_temp_and_pressure_compensate(struct ms5611_state *st,
|
||||||
s32 *temp, s32 *pressure)
|
s32 *temp, s32 *pressure)
|
||||||
{
|
{
|
||||||
s32 t = *temp, p = *pressure;
|
s32 t = *temp, p = *pressure;
|
||||||
s64 off, sens, dt;
|
s64 off, sens, dt;
|
||||||
|
|
||||||
dt = t - (chip_info->prom[5] << 8);
|
dt = t - (st->prom[5] << 8);
|
||||||
off = ((s64)chip_info->prom[2] << 17) + ((chip_info->prom[4] * dt) >> 6);
|
off = ((s64)st->prom[2] << 17) + ((st->prom[4] * dt) >> 6);
|
||||||
sens = ((s64)chip_info->prom[1] << 16) + ((chip_info->prom[3] * dt) >> 7);
|
sens = ((s64)st->prom[1] << 16) + ((st->prom[3] * dt) >> 7);
|
||||||
|
|
||||||
t = 2000 + ((chip_info->prom[6] * dt) >> 23);
|
t = 2000 + ((st->prom[6] * dt) >> 23);
|
||||||
if (t < 2000) {
|
if (t < 2000) {
|
||||||
s64 off2, sens2, t2, tmp;
|
s64 off2, sens2, t2, tmp;
|
||||||
|
|
||||||
|
@ -342,15 +341,6 @@ static int ms5611_write_raw(struct iio_dev *indio_dev,
|
||||||
|
|
||||||
static const unsigned long ms5611_scan_masks[] = {0x3, 0};
|
static const unsigned long ms5611_scan_masks[] = {0x3, 0};
|
||||||
|
|
||||||
static struct ms5611_chip_info chip_info_tbl[] = {
|
|
||||||
[MS5611] = {
|
|
||||||
.temp_and_pressure_compensate = ms5611_temp_and_pressure_compensate,
|
|
||||||
},
|
|
||||||
[MS5607] = {
|
|
||||||
.temp_and_pressure_compensate = ms5607_temp_and_pressure_compensate,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct iio_chan_spec ms5611_channels[] = {
|
static const struct iio_chan_spec ms5611_channels[] = {
|
||||||
{
|
{
|
||||||
.type = IIO_PRESSURE,
|
.type = IIO_PRESSURE,
|
||||||
|
@ -433,7 +423,20 @@ int ms5611_probe(struct iio_dev *indio_dev, struct device *dev,
|
||||||
struct ms5611_state *st = iio_priv(indio_dev);
|
struct ms5611_state *st = iio_priv(indio_dev);
|
||||||
|
|
||||||
mutex_init(&st->lock);
|
mutex_init(&st->lock);
|
||||||
st->chip_info = &chip_info_tbl[type];
|
|
||||||
|
switch (type) {
|
||||||
|
case MS5611:
|
||||||
|
st->compensate_temp_and_pressure =
|
||||||
|
ms5611_temp_and_pressure_compensate;
|
||||||
|
break;
|
||||||
|
case MS5607:
|
||||||
|
st->compensate_temp_and_pressure =
|
||||||
|
ms5607_temp_and_pressure_compensate;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
st->temp_osr =
|
st->temp_osr =
|
||||||
&ms5611_avail_temp_osr[ARRAY_SIZE(ms5611_avail_temp_osr) - 1];
|
&ms5611_avail_temp_osr[ARRAY_SIZE(ms5611_avail_temp_osr) - 1];
|
||||||
st->pressure_osr =
|
st->pressure_osr =
|
||||||
|
|
|
@ -91,7 +91,7 @@ static int ms5611_spi_probe(struct spi_device *spi)
|
||||||
spi_set_drvdata(spi, indio_dev);
|
spi_set_drvdata(spi, indio_dev);
|
||||||
|
|
||||||
spi->mode = SPI_MODE_0;
|
spi->mode = SPI_MODE_0;
|
||||||
spi->max_speed_hz = 20000000;
|
spi->max_speed_hz = min(spi->max_speed_hz, 20000000U);
|
||||||
spi->bits_per_word = 8;
|
spi->bits_per_word = 8;
|
||||||
ret = spi_setup(spi);
|
ret = spi_setup(spi);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
|
@ -203,9 +203,13 @@ static int iio_sysfs_trigger_remove(int id)
|
||||||
|
|
||||||
static int __init iio_sysfs_trig_init(void)
|
static int __init iio_sysfs_trig_init(void)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
device_initialize(&iio_sysfs_trig_dev);
|
device_initialize(&iio_sysfs_trig_dev);
|
||||||
dev_set_name(&iio_sysfs_trig_dev, "iio_sysfs_trigger");
|
dev_set_name(&iio_sysfs_trig_dev, "iio_sysfs_trigger");
|
||||||
return device_add(&iio_sysfs_trig_dev);
|
ret = device_add(&iio_sysfs_trig_dev);
|
||||||
|
if (ret)
|
||||||
|
put_device(&iio_sysfs_trig_dev);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
module_init(iio_sysfs_trig_init);
|
module_init(iio_sysfs_trig_init);
|
||||||
|
|
||||||
|
|
|
@ -854,6 +854,7 @@ static int qp_notify_peer_local(bool attach, struct vmci_handle handle)
|
||||||
u32 context_id = vmci_get_context_id();
|
u32 context_id = vmci_get_context_id();
|
||||||
struct vmci_event_qp ev;
|
struct vmci_event_qp ev;
|
||||||
|
|
||||||
|
memset(&ev, 0, sizeof(ev));
|
||||||
ev.msg.hdr.dst = vmci_make_handle(context_id, VMCI_EVENT_HANDLER);
|
ev.msg.hdr.dst = vmci_make_handle(context_id, VMCI_EVENT_HANDLER);
|
||||||
ev.msg.hdr.src = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
|
ev.msg.hdr.src = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
|
||||||
VMCI_CONTEXT_RESOURCE_ID);
|
VMCI_CONTEXT_RESOURCE_ID);
|
||||||
|
@ -1467,6 +1468,7 @@ static int qp_notify_peer(bool attach,
|
||||||
* kernel.
|
* kernel.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
memset(&ev, 0, sizeof(ev));
|
||||||
ev.msg.hdr.dst = vmci_make_handle(peer_id, VMCI_EVENT_HANDLER);
|
ev.msg.hdr.dst = vmci_make_handle(peer_id, VMCI_EVENT_HANDLER);
|
||||||
ev.msg.hdr.src = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
|
ev.msg.hdr.src = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
|
||||||
VMCI_CONTEXT_RESOURCE_ID);
|
VMCI_CONTEXT_RESOURCE_ID);
|
||||||
|
|
|
@ -203,7 +203,7 @@ static int lan9662_otp_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id lan9662_otp_match[] = {
|
static const struct of_device_id lan9662_otp_match[] = {
|
||||||
{ .compatible = "microchip,lan9662-otp", },
|
{ .compatible = "microchip,lan9662-otpc", },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, lan9662_otp_match);
|
MODULE_DEVICE_TABLE(of, lan9662_otp_match);
|
||||||
|
|
|
@ -135,7 +135,7 @@ static int u_boot_env_parse(struct u_boot_env *priv)
|
||||||
break;
|
break;
|
||||||
case U_BOOT_FORMAT_REDUNDANT:
|
case U_BOOT_FORMAT_REDUNDANT:
|
||||||
crc32_offset = offsetof(struct u_boot_env_image_redundant, crc32);
|
crc32_offset = offsetof(struct u_boot_env_image_redundant, crc32);
|
||||||
crc32_data_offset = offsetof(struct u_boot_env_image_redundant, mark);
|
crc32_data_offset = offsetof(struct u_boot_env_image_redundant, data);
|
||||||
data_offset = offsetof(struct u_boot_env_image_redundant, data);
|
data_offset = offsetof(struct u_boot_env_image_redundant, data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -468,7 +468,7 @@ static size_t parport_pc_fifo_write_block_pio(struct parport *port,
|
||||||
const unsigned char *bufp = buf;
|
const unsigned char *bufp = buf;
|
||||||
size_t left = length;
|
size_t left = length;
|
||||||
unsigned long expire = jiffies + port->physport->cad->timeout;
|
unsigned long expire = jiffies + port->physport->cad->timeout;
|
||||||
const int fifo = FIFO(port);
|
const unsigned long fifo = FIFO(port);
|
||||||
int poll_for = 8; /* 80 usecs */
|
int poll_for = 8; /* 80 usecs */
|
||||||
const struct parport_pc_private *priv = port->physport->private_data;
|
const struct parport_pc_private *priv = port->physport->private_data;
|
||||||
const int fifo_depth = priv->fifo_depth;
|
const int fifo_depth = priv->fifo_depth;
|
||||||
|
|
|
@ -839,6 +839,8 @@ static struct siox_device *siox_device_add(struct siox_master *smaster,
|
||||||
|
|
||||||
err_device_register:
|
err_device_register:
|
||||||
/* don't care to make the buffer smaller again */
|
/* don't care to make the buffer smaller again */
|
||||||
|
put_device(&sdevice->dev);
|
||||||
|
sdevice = NULL;
|
||||||
|
|
||||||
err_buf_alloc:
|
err_buf_alloc:
|
||||||
siox_master_unlock(smaster);
|
siox_master_unlock(smaster);
|
||||||
|
|
|
@ -23,7 +23,7 @@ config SLIM_QCOM_CTRL
|
||||||
config SLIM_QCOM_NGD_CTRL
|
config SLIM_QCOM_NGD_CTRL
|
||||||
tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
|
tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component"
|
||||||
depends on HAS_IOMEM && DMA_ENGINE && NET
|
depends on HAS_IOMEM && DMA_ENGINE && NET
|
||||||
depends on QCOM_RPROC_COMMON || COMPILE_TEST
|
depends on QCOM_RPROC_COMMON || (COMPILE_TEST && !QCOM_RPROC_COMMON)
|
||||||
depends on ARCH_QCOM || COMPILE_TEST
|
depends on ARCH_QCOM || COMPILE_TEST
|
||||||
select QCOM_QMI_HELPERS
|
select QCOM_QMI_HELPERS
|
||||||
select QCOM_PDR_HELPERS
|
select QCOM_PDR_HELPERS
|
||||||
|
|
|
@ -67,10 +67,10 @@ static const int slim_presence_rate_table[] = {
|
||||||
384000,
|
384000,
|
||||||
768000,
|
768000,
|
||||||
0, /* Reserved */
|
0, /* Reserved */
|
||||||
110250,
|
11025,
|
||||||
220500,
|
22050,
|
||||||
441000,
|
44100,
|
||||||
882000,
|
88200,
|
||||||
176400,
|
176400,
|
||||||
352800,
|
352800,
|
||||||
705600,
|
705600,
|
||||||
|
|
|
@ -715,12 +715,12 @@ int main(int argc, char **argv)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
toread = buf_len;
|
|
||||||
} else {
|
} else {
|
||||||
usleep(timedelay);
|
usleep(timedelay);
|
||||||
toread = 64;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toread = buf_len;
|
||||||
|
|
||||||
read_size = read(buf_fd, data, toread * scan_size);
|
read_size = read(buf_fd, data, toread * scan_size);
|
||||||
if (read_size < 0) {
|
if (read_size < 0) {
|
||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue