Subject: linux-next: manual merge of the iio tree with the staging.current tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 12 May 2021 11:43:42 +1000

Hi all,

Today's linux-next merge of the iio tree got a conflict in:

  drivers/iio/industrialio-core.c

between commit:

  901f84de0e16 ("iio: core: fix ioctl handlers removal")

from the staging.current tree and commit:

  919a6adf8107 ("iio: core: move @chrdev from struct iio_dev to struct iio_dev_opaque")

from the iio tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/iio/industrialio-core.c
index 59efb36db2c7,efb4cf91c9e4..000000000000
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@@ -1785,10 -1811,10 +1810,10 @@@ static long iio_ioctl(struct file *filp
  	}
  
  	if (ret == IIO_IOCTL_UNHANDLED)
 -		ret = -EINVAL;
 +		ret = -ENODEV;
  
  out_unlock:
- 	mutex_unlock(&indio_dev->info_exist_lock);
+ 	mutex_unlock(&iio_dev_opaque->info_exist_lock);
  
  	return ret;
  }
@@@ -1925,9 -1951,12 +1950,9 @@@ EXPORT_SYMBOL(__iio_device_register)
   **/
  void iio_device_unregister(struct iio_dev *indio_dev)
  {
- 	cdev_device_del(&indio_dev->chrdev, &indio_dev->dev);
 -	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 -	struct iio_ioctl_handler *h, *t;
 -
+ 	cdev_device_del(&iio_dev_opaque->chrdev, &indio_dev->dev);
  
- 	mutex_lock(&indio_dev->info_exist_lock);
+ 	mutex_lock(&iio_dev_opaque->info_exist_lock);
  
  	iio_device_unregister_debugfs(indio_dev);