diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2019-12-04 13:56:52 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-12-09 10:27:35 +0100 |
commit | 2c2fbeabf9c58cbf3162dcbc0aafd3093be558ee (patch) | |
tree | 7d1ab2376acba34e3837d502e20d14bf3fe10dc1 /include | |
parent | ca79508e0f717a62e5302330b4a62b2f28a1b032 (diff) | |
download | barebox-2c2fbeabf9c58cbf3162dcbc0aafd3093be558ee.tar.gz barebox-2c2fbeabf9c58cbf3162dcbc0aafd3093be558ee.tar.xz |
driver: add missing parentheses around macro argument
Currently, the macro can't be used for more complex expressions
like &pci_dev->dev. Fix this by adding the missing parentheses.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/driver.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/driver.h b/include/driver.h index 300603fa32..ad59ce90c3 100644 --- a/include/driver.h +++ b/include/driver.h @@ -155,12 +155,12 @@ int unregister_device(struct device_d *); /* Iterate over a devices children */ #define device_for_each_child(dev, child) \ - list_for_each_entry(child, &dev->children, sibling) + list_for_each_entry(child, &(dev)->children, sibling) /* Iterate over a devices children - Safe against removal version */ #define device_for_each_child_safe(dev, tmpdev, child) \ - list_for_each_entry_safe(child, tmpdev, &dev->children, sibling) + list_for_each_entry_safe(child, tmpdev, &(dev)->children, sibling) /* Iterate through the devices of a given type. if last is NULL, the * first device of this type is returned. Put this pointer in as |