Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482Ab3DVCOD (ORCPT ); Sun, 21 Apr 2013 22:14:03 -0400 Received: from mail-oa0-f52.google.com ([209.85.219.52]:52031 "EHLO mail-oa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754295Ab3DVCNn (ORCPT ); Sun, 21 Apr 2013 22:13:43 -0400 From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Cc: Grant Likely , Arnd Bergmann , Rob Herring Subject: [PATCH 5/5] of: remove CONFIG_OF_DEVICE Date: Sun, 21 Apr 2013 21:13:18 -0500 Message-Id: <1366596798-9457-6-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366596798-9457-1-git-send-email-robherring2@gmail.com> References: <1366596798-9457-1-git-send-email-robherring2@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3483 Lines: 115 From: Rob Herring CONFIG_OF_DEVICE is always selected when CONFIG_OF is enabled, so remove it and simplify of_platform.h and of_device.h headers. This also fixes !OF compiles using of_platform_populate. Signed-off-by: Rob Herring Cc: Grant Likely --- drivers/of/Kconfig | 3 --- drivers/of/Makefile | 3 +-- include/linux/of_device.h | 6 +++--- include/linux/of_platform.h | 9 +-------- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index d37bfcf..80e5c13 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -48,9 +48,6 @@ config OF_IRQ def_bool y depends on !SPARC -config OF_DEVICE - def_bool y - config OF_I2C def_tristate I2C depends on I2C diff --git a/drivers/of/Makefile b/drivers/of/Makefile index e027f44..1f9c0c4 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -1,9 +1,8 @@ -obj-y = base.o +obj-y = base.o device.o platform.o obj-$(CONFIG_OF_FLATTREE) += fdt.o obj-$(CONFIG_OF_PROMTREE) += pdt.o obj-$(CONFIG_OF_ADDRESS) += address.o obj-$(CONFIG_OF_IRQ) += irq.o -obj-$(CONFIG_OF_DEVICE) += device.o platform.o obj-$(CONFIG_OF_I2C) += of_i2c.o obj-$(CONFIG_OF_NET) += of_net.o obj-$(CONFIG_OF_SELFTEST) += selftest.o diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 901b743..9d27475 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -4,12 +4,12 @@ #include #include /* temporary until merge */ -#ifdef CONFIG_OF_DEVICE #include #include struct device; +#ifdef CONFIG_OF extern const struct of_device_id *of_match_device( const struct of_device_id *matches, const struct device *dev); extern void of_device_make_bus_id(struct device *dev); @@ -43,7 +43,7 @@ static inline void of_device_node_put(struct device *dev) of_node_put(dev->of_node); } -#else /* CONFIG_OF_DEVICE */ +#else /* CONFIG_OF */ static inline int of_driver_match_device(struct device *dev, struct device_driver *drv) @@ -67,6 +67,6 @@ static inline const struct of_device_id *of_match_device( { return NULL; } -#endif /* CONFIG_OF_DEVICE */ +#endif /* CONFIG_OF */ #endif /* _LINUX_OF_DEVICE_H */ diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index aa7eb02..6b840f0 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -13,8 +13,6 @@ #include #include - -#ifdef CONFIG_OF_DEVICE #include #include #include @@ -74,13 +72,8 @@ extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, struct device *parent); -#endif /* CONFIG_OF_ADDRESS */ - -#endif /* CONFIG_OF_DEVICE */ +#else -#if !defined(CONFIG_OF_ADDRESS) -struct of_dev_auxdata; -struct device_node; static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/