Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db4a57e6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging and IIO driver fixes from Greg KH:
 "Here are some small staging and iio driver fixes for reported issues
  for 4.9-rc3. Nothing major, the "largest" being a lustre fix for a
  sysfs file that was obviously wrong, and had never been tested, so it
  was moved to debugfs as that is where it belongs. The others are small
  bug fixes for reported issues with various staging or iio drivers.

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

* tag 'staging-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  greybus: fix a leak on error in gb_module_create()
  greybus: es2: fix error return code in ap_probe()
  greybus: arche-platform: Add missing of_node_put() in arche_platform_change_state()
  staging: android: ion: Fix error handling in ion_query_heaps()
  iio: accel: sca3000_core: avoid potentially uninitialized variable
  iio:chemical:atlas-ph-sensor: Fix use of 32 bit int to hold 16 bit big endian value
  staging/lustre/llite: Move unstable_stats from sysfs to debugfs
  Staging: wilc1000: Fix kernel Oops on opening the device
  staging: android/ion: testing the wrong variable
  Staging: greybus: uart: Use gbphy_dev->dev instead of bundle->dev
  Staging: greybus: gpio: Use gbphy_dev->dev instead of bundle->dev
  iio: adc: ti-adc081c: Select IIO_TRIGGERED_BUFFER to prevent build errors
  iio: maxim_thermocouple: Align 16 bit big endian value of raw reads
parents 37cc6bb8 e866dd8a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -437,6 +437,8 @@ config STX104
config TI_ADC081C
	tristate "Texas Instruments ADC081C/ADC101C/ADC121C family"
	depends on I2C
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
	  If you say yes here you get support for Texas Instruments ADC081C,
	  ADC101C and ADC121C ADC chips.
+4 −3
Original line number Diff line number Diff line
@@ -213,13 +213,14 @@ static int atlas_check_ec_calibration(struct atlas_data *data)
	struct device *dev = &data->client->dev;
	int ret;
	unsigned int val;
	__be16	rval;

	ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &val, 2);
	ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &rval, 2);
	if (ret)
		return ret;

	dev_info(dev, "probe set to K = %d.%.2d", be16_to_cpu(val) / 100,
						 be16_to_cpu(val) % 100);
	val = be16_to_cpu(rval);
	dev_info(dev, "probe set to K = %d.%.2d", val / 100, val % 100);

	ret = regmap_read(data->regmap, ATLAS_REG_EC_CALIB_STATUS, &val);
	if (ret)
+9 −7
Original line number Diff line number Diff line
@@ -123,22 +123,24 @@ static int maxim_thermocouple_read(struct maxim_thermocouple_data *data,
{
	unsigned int storage_bytes = data->chip->read_size;
	unsigned int shift = chan->scan_type.shift + (chan->address * 8);
	unsigned int buf;
	__be16 buf16;
	__be32 buf32;
	int ret;

	ret = spi_read(data->spi, (void *) &buf, storage_bytes);
	if (ret)
		return ret;

	switch (storage_bytes) {
	case 2:
		*val = be16_to_cpu(buf);
		ret = spi_read(data->spi, (void *)&buf16, storage_bytes);
		*val = be16_to_cpu(buf16);
		break;
	case 4:
		*val = be32_to_cpu(buf);
		ret = spi_read(data->spi, (void *)&buf32, storage_bytes);
		*val = be32_to_cpu(buf32);
		break;
	}

	if (ret)
		return ret;

	/* check to be sure this is a valid reading */
	if (*val & data->chip->status_bit)
		return -EINVAL;
+4 −2
Original line number Diff line number Diff line
@@ -1187,8 +1187,10 @@ int ion_query_heaps(struct ion_client *client, struct ion_heap_query *query)
		hdata.type = heap->type;
		hdata.heap_id = heap->id;

		ret = copy_to_user(&buffer[cnt],
				   &hdata, sizeof(hdata));
		if (copy_to_user(&buffer[cnt], &hdata, sizeof(hdata))) {
			ret = -EFAULT;
			goto out;
		}

		cnt++;
		if (cnt >= max_cnt)
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,

		heap_pdev = of_platform_device_create(node, heaps[i].name,
						      &pdev->dev);
		if (!pdev)
		if (!heap_pdev)
			return ERR_PTR(-ENOMEM);
		heap_pdev->dev.platform_data = &heaps[i];

Loading