Commit e2e5ebec authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are a small number of char/misc/other driver fixes for 5.18-rc5

  Nothing major in here, this is mostly IIO driver fixes along with some
  other small things:

   - at25 driver fix for systems without a dma-able stack

   - phy driver fixes for reported issues

   - binder driver fixes for reported issues

  All of these have been in linux-next without any reported problems"

* tag 'char-misc-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (31 commits)
  eeprom: at25: Use DMA safe buffers
  binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0
  binder: Address corner cases in deferred copy and fixup
  phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()
  iio: imu: inv_icm42600: Fix I2C init possible nack
  iio: dac: ltc2688: fix voltage scale read
  interconnect: qcom: sdx55: Drop IP0 interconnects
  interconnect: qcom: sc7180: Drop IP0 interconnects
  phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
  phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe
  phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks
  bus: mhi: host: pci_generic: Flush recovery worker during freeze
  bus: mhi: host: pci_generic: Add missing poweroff() PM callback
  phy: ti: tusb1210: Fix an error handling path in tusb1210_probe()
  phy: samsung: exynos5250-sata: fix missing device put in probe error paths
  phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
  phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
  phy: ti: tusb1210: Make tusb1210_chg_det_states static
  iio:dac:ad3552r: Fix an IS_ERR() vs NULL check
  iio: sx9324: Fix default precharge internal resistance register
  ...
parents a6b5c5dc fda05730
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -2295,6 +2295,7 @@ static int binder_do_deferred_txn_copies(struct binder_alloc *alloc,
{
	int ret = 0;
	struct binder_sg_copy *sgc, *tmpsgc;
	struct binder_ptr_fixup *tmppf;
	struct binder_ptr_fixup *pf =
		list_first_entry_or_null(pf_head, struct binder_ptr_fixup,
					 node);
@@ -2349,7 +2350,11 @@ static int binder_do_deferred_txn_copies(struct binder_alloc *alloc,
		list_del(&sgc->node);
		kfree(sgc);
	}
	BUG_ON(!list_empty(pf_head));
	list_for_each_entry_safe(pf, tmppf, pf_head, node) {
		BUG_ON(pf->skip_size == 0);
		list_del(&pf->node);
		kfree(pf);
	}
	BUG_ON(!list_empty(sgc_head));

	return ret > 0 ? -EINVAL : ret;
@@ -2486,6 +2491,9 @@ static int binder_translate_fd_array(struct list_head *pf_head,
	struct binder_proc *proc = thread->proc;
	int ret;

	if (fda->num_fds == 0)
		return 0;

	fd_buf_size = sizeof(u32) * fda->num_fds;
	if (fda->num_fds >= SIZE_MAX / sizeof(u32)) {
		binder_user_error("%d:%d got transaction with invalid number of fds (%lld)\n",
+2 −0
Original line number Diff line number Diff line
@@ -1060,6 +1060,7 @@ static int __maybe_unused mhi_pci_freeze(struct device *dev)
	 * the intermediate restore kernel reinitializes MHI device with new
	 * context.
	 */
	flush_work(&mhi_pdev->recovery_work);
	if (test_and_clear_bit(MHI_PCI_DEV_STARTED, &mhi_pdev->status)) {
		mhi_power_down(mhi_cntrl, true);
		mhi_unprepare_after_power_down(mhi_cntrl);
@@ -1085,6 +1086,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = {
	.resume = mhi_pci_resume,
	.freeze = mhi_pci_freeze,
	.thaw = mhi_pci_restore,
	.poweroff = mhi_pci_freeze,
	.restore = mhi_pci_restore,
#endif
};
+6 −6
Original line number Diff line number Diff line
@@ -745,7 +745,7 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
		case IIO_EV_DIR_RISING:
			addr = AD7280A_CELL_OVERVOLTAGE_REG;
			ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
					   1, val);
					   1, value);
			if (ret)
				break;
			st->cell_threshhigh = value;
@@ -753,7 +753,7 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
		case IIO_EV_DIR_FALLING:
			addr = AD7280A_CELL_UNDERVOLTAGE_REG;
			ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
					   1, val);
					   1, value);
			if (ret)
				break;
			st->cell_threshlow = value;
@@ -770,18 +770,18 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
		case IIO_EV_DIR_RISING:
			addr = AD7280A_AUX_ADC_OVERVOLTAGE_REG;
			ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
					   1, val);
					   1, value);
			if (ret)
				break;
			st->aux_threshhigh = val;
			st->aux_threshhigh = value;
			break;
		case IIO_EV_DIR_FALLING:
			addr = AD7280A_AUX_ADC_UNDERVOLTAGE_REG;
			ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
					   1, val);
					   1, value);
			if (ret)
				break;
			st->aux_threshlow = val;
			st->aux_threshlow = value;
			break;
		default:
			ret = -EINVAL;
+4 −1
Original line number Diff line number Diff line
@@ -471,12 +471,15 @@ static ssize_t calibration_forced_value_store(struct device *dev,
	ret = scd4x_write_and_fetch(state, CMD_FRC, arg, &val, sizeof(val));
	mutex_unlock(&state->lock);

	if (ret)
		return ret;

	if (val == 0xff) {
		dev_err(dev, "forced calibration has failed");
		return -EINVAL;
	}

	return ret ?: len;
	return len;
}

static IIO_DEVICE_ATTR_RW(calibration_auto_enable, 0);
+3 −3
Original line number Diff line number Diff line
@@ -656,7 +656,7 @@ static int ad3552r_reset(struct ad3552r_desc *dac)
{
	struct reg_addr_pool addr;
	int ret;
	u16 val;
	int val;

	dac->gpio_reset = devm_gpiod_get_optional(&dac->spi->dev, "reset",
						  GPIOD_OUT_LOW);
@@ -809,10 +809,10 @@ static int ad3552r_configure_custom_gain(struct ad3552r_desc *dac,

	gain_child = fwnode_get_named_child_node(child,
						 "custom-output-range-config");
	if (IS_ERR(gain_child)) {
	if (!gain_child) {
		dev_err(dev,
			"mandatory custom-output-range-config property missing\n");
		return PTR_ERR(gain_child);
		return -EINVAL;
	}

	dac->ch_data[ch].range_override = 1;
Loading