Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/iio fixes from Greg KH:
"Here are some small staging and IIO driver fixes for 5.7-rc7

Nothing major, just a collection of IIO driver fixes for reported
issues, and a few small staging driver fixes that people have found.
Full details are in the shortlog.

All of these have been in linux-next for a while with no reported
issues"

* tag 'staging-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: wfx: unlock on error path
staging: greybus: Fix uninitialized scalar variable
staging: kpc2000: fix error return code in kp2000_pcie_probe()
iio: sca3000: Remove an erroneous 'get_device()'
iio: adc: stm32-dfsdm: fix device used to request dma
iio: adc: stm32-adc: fix device used to request dma
iio: adc: ti-ads8344: Fix channel selection
staging: iio: ad2s1210: Fix SPI reading
iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()'
iio: imu: st_lsm6dsx: unlock on error in st_lsm6dsx_shub_write_raw()
iio: chemical: atlas-sensor: correct DO-SM channels

+61 -34
+1 -1
drivers/iio/accel/sca3000.c
··· 980 980 st->tx[0] = SCA3000_READ_REG(reg_address_high); 981 981 ret = spi_sync_transfer(st->us, xfer, ARRAY_SIZE(xfer)); 982 982 if (ret) { 983 - dev_err(get_device(&st->us->dev), "problem reading register"); 983 + dev_err(&st->us->dev, "problem reading register\n"); 984 984 return ret; 985 985 } 986 986
+4 -4
drivers/iio/adc/stm32-adc.c
··· 1812 1812 return 0; 1813 1813 } 1814 1814 1815 - static int stm32_adc_dma_request(struct iio_dev *indio_dev) 1815 + static int stm32_adc_dma_request(struct device *dev, struct iio_dev *indio_dev) 1816 1816 { 1817 1817 struct stm32_adc *adc = iio_priv(indio_dev); 1818 1818 struct dma_slave_config config; 1819 1819 int ret; 1820 1820 1821 - adc->dma_chan = dma_request_chan(&indio_dev->dev, "rx"); 1821 + adc->dma_chan = dma_request_chan(dev, "rx"); 1822 1822 if (IS_ERR(adc->dma_chan)) { 1823 1823 ret = PTR_ERR(adc->dma_chan); 1824 1824 if (ret != -ENODEV) { 1825 1825 if (ret != -EPROBE_DEFER) 1826 - dev_err(&indio_dev->dev, 1826 + dev_err(dev, 1827 1827 "DMA channel request failed with %d\n", 1828 1828 ret); 1829 1829 return ret; ··· 1930 1930 if (ret < 0) 1931 1931 return ret; 1932 1932 1933 - ret = stm32_adc_dma_request(indio_dev); 1933 + ret = stm32_adc_dma_request(dev, indio_dev); 1934 1934 if (ret < 0) 1935 1935 return ret; 1936 1936
+11 -10
drivers/iio/adc/stm32-dfsdm-adc.c
··· 62 62 63 63 struct stm32_dfsdm_dev_data { 64 64 int type; 65 - int (*init)(struct iio_dev *indio_dev); 65 + int (*init)(struct device *dev, struct iio_dev *indio_dev); 66 66 unsigned int num_channels; 67 67 const struct regmap_config *regmap_cfg; 68 68 }; ··· 1365 1365 } 1366 1366 } 1367 1367 1368 - static int stm32_dfsdm_dma_request(struct iio_dev *indio_dev) 1368 + static int stm32_dfsdm_dma_request(struct device *dev, 1369 + struct iio_dev *indio_dev) 1369 1370 { 1370 1371 struct stm32_dfsdm_adc *adc = iio_priv(indio_dev); 1371 1372 1372 - adc->dma_chan = dma_request_chan(&indio_dev->dev, "rx"); 1373 + adc->dma_chan = dma_request_chan(dev, "rx"); 1373 1374 if (IS_ERR(adc->dma_chan)) { 1374 1375 int ret = PTR_ERR(adc->dma_chan); 1375 1376 ··· 1426 1425 &adc->dfsdm->ch_list[ch->channel]); 1427 1426 } 1428 1427 1429 - static int stm32_dfsdm_audio_init(struct iio_dev *indio_dev) 1428 + static int stm32_dfsdm_audio_init(struct device *dev, struct iio_dev *indio_dev) 1430 1429 { 1431 1430 struct iio_chan_spec *ch; 1432 1431 struct stm32_dfsdm_adc *adc = iio_priv(indio_dev); ··· 1453 1452 indio_dev->num_channels = 1; 1454 1453 indio_dev->channels = ch; 1455 1454 1456 - return stm32_dfsdm_dma_request(indio_dev); 1455 + return stm32_dfsdm_dma_request(dev, indio_dev); 1457 1456 } 1458 1457 1459 - static int stm32_dfsdm_adc_init(struct iio_dev *indio_dev) 1458 + static int stm32_dfsdm_adc_init(struct device *dev, struct iio_dev *indio_dev) 1460 1459 { 1461 1460 struct iio_chan_spec *ch; 1462 1461 struct stm32_dfsdm_adc *adc = iio_priv(indio_dev); ··· 1500 1499 init_completion(&adc->completion); 1501 1500 1502 1501 /* Optionally request DMA */ 1503 - ret = stm32_dfsdm_dma_request(indio_dev); 1502 + ret = stm32_dfsdm_dma_request(dev, indio_dev); 1504 1503 if (ret) { 1505 1504 if (ret != -ENODEV) { 1506 1505 if (ret != -EPROBE_DEFER) 1507 - dev_err(&indio_dev->dev, 1506 + dev_err(dev, 1508 1507 "DMA channel request failed with %d\n", 1509 1508 ret); 1510 1509 return ret; 1511 1510 } 1512 1511 1513 - dev_dbg(&indio_dev->dev, "No DMA support\n"); 1512 + dev_dbg(dev, "No DMA support\n"); 1514 1513 return 0; 1515 1514 } 1516 1515 ··· 1623 1622 adc->dfsdm->fl_list[adc->fl_id].sync_mode = val; 1624 1623 1625 1624 adc->dev_data = dev_data; 1626 - ret = dev_data->init(iio); 1625 + ret = dev_data->init(dev, iio); 1627 1626 if (ret < 0) 1628 1627 return ret; 1629 1628
+5 -3
drivers/iio/adc/ti-ads8344.c
··· 32 32 u8 rx_buf[3]; 33 33 }; 34 34 35 - #define ADS8344_VOLTAGE_CHANNEL(chan, si) \ 35 + #define ADS8344_VOLTAGE_CHANNEL(chan, addr) \ 36 36 { \ 37 37 .type = IIO_VOLTAGE, \ 38 38 .indexed = 1, \ 39 39 .channel = chan, \ 40 40 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ 41 41 .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ 42 + .address = addr, \ 42 43 } 43 44 44 - #define ADS8344_VOLTAGE_CHANNEL_DIFF(chan1, chan2, si) \ 45 + #define ADS8344_VOLTAGE_CHANNEL_DIFF(chan1, chan2, addr) \ 45 46 { \ 46 47 .type = IIO_VOLTAGE, \ 47 48 .indexed = 1, \ ··· 51 50 .differential = 1, \ 52 51 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ 53 52 .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ 53 + .address = addr, \ 54 54 } 55 55 56 56 static const struct iio_chan_spec ads8344_channels[] = { ··· 107 105 switch (mask) { 108 106 case IIO_CHAN_INFO_RAW: 109 107 mutex_lock(&adc->lock); 110 - *value = ads8344_adc_conversion(adc, channel->scan_index, 108 + *value = ads8344_adc_conversion(adc, channel->address, 111 109 channel->differential); 112 110 mutex_unlock(&adc->lock); 113 111 if (*value < 0)
+13 -1
drivers/iio/chemical/atlas-sensor.c
··· 194 194 }; 195 195 196 196 static const struct iio_chan_spec atlas_do_channels[] = { 197 - ATLAS_CONCENTRATION_CHANNEL(0, ATLAS_REG_DO_DATA), 197 + { 198 + .type = IIO_CONCENTRATION, 199 + .address = ATLAS_REG_DO_DATA, 200 + .info_mask_separate = 201 + BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), 202 + .scan_index = 0, 203 + .scan_type = { 204 + .sign = 'u', 205 + .realbits = 32, 206 + .storagebits = 32, 207 + .endianness = IIO_BE, 208 + }, 209 + }, 198 210 IIO_CHAN_SOFT_TIMESTAMP(1), 199 211 { 200 212 .type = IIO_TEMP,
+1
drivers/iio/dac/vf610_dac.c
··· 223 223 return 0; 224 224 225 225 error_iio_device_register: 226 + vf610_dac_exit(info); 226 227 clk_disable_unprepare(info->clk); 227 228 228 229 return ret;
+5 -2
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c
··· 544 544 545 545 ref_sensor = iio_priv(hw->iio_devs[ST_LSM6DSX_ID_ACC]); 546 546 odr = st_lsm6dsx_check_odr(ref_sensor, val, &odr_val); 547 - if (odr < 0) 548 - return odr; 547 + if (odr < 0) { 548 + err = odr; 549 + goto release; 550 + } 549 551 550 552 sensor->ext_info.slv_odr = val; 551 553 sensor->odr = odr; ··· 559 557 break; 560 558 } 561 559 560 + release: 562 561 iio_device_release_direct_mode(iio_dev); 563 562 564 563 return err;
+2 -2
drivers/staging/greybus/uart.c
··· 537 537 } 538 538 539 539 if (C_CRTSCTS(tty) && C_BAUD(tty) != B0) 540 - newline.flow_control |= GB_SERIAL_AUTO_RTSCTS_EN; 540 + newline.flow_control = GB_SERIAL_AUTO_RTSCTS_EN; 541 541 else 542 - newline.flow_control &= ~GB_SERIAL_AUTO_RTSCTS_EN; 542 + newline.flow_control = 0; 543 543 544 544 if (memcmp(&gb_tty->line_coding, &newline, sizeof(newline))) { 545 545 memcpy(&gb_tty->line_coding, &newline, sizeof(newline));
+12 -5
drivers/staging/iio/resolver/ad2s1210.c
··· 130 130 static int ad2s1210_config_read(struct ad2s1210_state *st, 131 131 unsigned char address) 132 132 { 133 - struct spi_transfer xfer = { 134 - .len = 2, 135 - .rx_buf = st->rx, 136 - .tx_buf = st->tx, 133 + struct spi_transfer xfers[] = { 134 + { 135 + .len = 1, 136 + .rx_buf = &st->rx[0], 137 + .tx_buf = &st->tx[0], 138 + .cs_change = 1, 139 + }, { 140 + .len = 1, 141 + .rx_buf = &st->rx[1], 142 + .tx_buf = &st->tx[1], 143 + }, 137 144 }; 138 145 int ret = 0; 139 146 140 147 ad2s1210_set_mode(MOD_CONFIG, st); 141 148 st->tx[0] = address | AD2S1210_MSB_IS_HIGH; 142 149 st->tx[1] = AD2S1210_REG_FAULT; 143 - ret = spi_sync_transfer(st->sdev, &xfer, 1); 150 + ret = spi_sync_transfer(st->sdev, xfers, 2); 144 151 if (ret < 0) 145 152 return ret; 146 153
+4 -5
drivers/staging/kpc2000/kpc2000/core.c
··· 298 298 { 299 299 int err = 0; 300 300 struct kp2000_device *pcard; 301 - int rv; 302 301 unsigned long reg_bar_phys_addr; 303 302 unsigned long reg_bar_phys_len; 304 303 unsigned long dma_bar_phys_addr; ··· 444 445 if (err < 0) 445 446 goto err_release_dma; 446 447 447 - rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED, 448 - pcard->name, pcard); 449 - if (rv) { 448 + err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED, 449 + pcard->name, pcard); 450 + if (err) { 450 451 dev_err(&pcard->pdev->dev, 451 - "%s: failed to request_irq: %d\n", __func__, rv); 452 + "%s: failed to request_irq: %d\n", __func__, err); 452 453 goto err_disable_msi; 453 454 } 454 455
+3 -1
drivers/staging/wfx/scan.c
··· 57 57 wvif->scan_abort = false; 58 58 reinit_completion(&wvif->scan_complete); 59 59 timeout = hif_scan(wvif, req, start_idx, i - start_idx); 60 - if (timeout < 0) 60 + if (timeout < 0) { 61 + wfx_tx_unlock(wvif->wdev); 61 62 return timeout; 63 + } 62 64 ret = wait_for_completion_timeout(&wvif->scan_complete, timeout); 63 65 if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) 64 66 hif_set_output_power(wvif, wvif->vif->bss_conf.txpower);