linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: core: fix/re-introduce back parent assignment
@ 2020-07-21 10:24 Alexandru Ardelean
  2020-07-21 10:34 ` Dmitry Baryshkov
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandru Ardelean @ 2020-07-21 10:24 UTC (permalink / raw)
  To: linux-iio, linux-kernel; +Cc: jic23, dbaryshkov, Alexandru Ardelean

This was introduced initially via commit 78289b4a58b58 ("iio: core: pass
parent device as parameter during allocation"), but was accidentally
removed via commit 6d4ebd565d15f ("iio: core: wrap IIO device into an
iio_dev_opaque object").

This looks like a rebase gone wrong, and ends up breaking devicetree
bindings of IIO clients.

This change adds back the parent assignment.

Fixes 6d4ebd565d15f: ("iio: core: wrap IIO device into an iio_dev_opaque object")
Reported-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 drivers/iio/industrialio-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 30fc96952681..59003dc44e60 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -1546,6 +1546,7 @@ struct iio_dev *iio_device_alloc(struct device *parent, int sizeof_priv)
 	dev->priv = (char *)iio_dev_opaque +
 		ALIGN(sizeof(struct iio_dev_opaque), IIO_ALIGN);
 
+	dev->dev.parent = parent;
 	dev->dev.groups = dev->groups;
 	dev->dev.type = &iio_device_type;
 	dev->dev.bus = &iio_bus_type;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: core: fix/re-introduce back parent assignment
  2020-07-21 10:24 [PATCH] iio: core: fix/re-introduce back parent assignment Alexandru Ardelean
@ 2020-07-21 10:34 ` Dmitry Baryshkov
  2020-07-21 12:19   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2020-07-21 10:34 UTC (permalink / raw)
  To: Alexandru Ardelean; +Cc: linux-iio, kernel list, Jonathan Cameron

вт, 21 июл. 2020 г. в 13:24, Alexandru Ardelean <alexandru.ardelean@analog.com>:
>
> This was introduced initially via commit 78289b4a58b58 ("iio: core: pass
> parent device as parameter during allocation"), but was accidentally
> removed via commit 6d4ebd565d15f ("iio: core: wrap IIO device into an
> iio_dev_opaque object").
>
> This looks like a rebase gone wrong, and ends up breaking devicetree
> bindings of IIO clients.
>
> This change adds back the parent assignment.
>
> Fixes 6d4ebd565d15f: ("iio: core: wrap IIO device into an iio_dev_opaque object")
> Reported-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Tested-by: Dmitry Baryshkov <dbaryshkov@gmail.com>

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: core: fix/re-introduce back parent assignment
  2020-07-21 10:34 ` Dmitry Baryshkov
@ 2020-07-21 12:19   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2020-07-21 12:19 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: Alexandru Ardelean, linux-iio, kernel list

On Tue, 21 Jul 2020 13:34:19 +0300
Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:

> вт, 21 июл. 2020 г. в 13:24, Alexandru Ardelean <alexandru.ardelean@analog.com>:
>  [...]  
> 
> Tested-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
> 
Applied to the togreg branch of iio.git and pushed out as testing.
Current plan is to do a pull request tomorrow so should make it in time
for the merge window.  If it gets delayed for some reason we can send
it as a fix after the merge window.

Thanks,

Jonathan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-21 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 10:24 [PATCH] iio: core: fix/re-introduce back parent assignment Alexandru Ardelean
2020-07-21 10:34 ` Dmitry Baryshkov
2020-07-21 12:19   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).