[PATCH] fixup! clk: stm32mp1: sync with Linux v5.17-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows discarding code at compile-time for drivers that can be
compiled without DT support.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 include/driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/driver.h b/include/driver.h
index 1ee255c9ad0c..85cb30f8b0b1 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -600,7 +600,7 @@ struct device_d *device_find_child(struct device_d *parent, void *data,
 
 static inline struct device_node *dev_of_node(struct device_d *dev)
 {
-	return dev->device_node;
+	return IS_ENABLED(CONFIG_OFDEVICE) ? dev->device_node : NULL;
 }
 
 #endif /* DRIVER_H */
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux