lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200721102407.134402-1-alexandru.ardelean@analog.com>
Date:   Tue, 21 Jul 2020 13:24:07 +0300
From:   Alexandru Ardelean <alexandru.ardelean@...log.com>
To:     <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <jic23@...nel.org>, <dbaryshkov@...il.com>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: [PATCH] iio: core: fix/re-introduce back parent assignment

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@...il.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ