[RFC PATCH 3.7.0-rc4 3/4] mm:sdhci-spear: use of_simple_module_id_table macro.

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

 



From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>

This patch uses of_simple_module_id_table macro to replace code like:

#ifdef CONFIG_OF
	static struct of_device_id xxx_of_match[] = {
		{ .compatible = "yyy,zzz" },
		{ },
	};
	MODULE_DEVICE_TABLE(of, xxx_of_match);
#endif

with
	of_simple_module_id_table(xxx_of_match, "yyy,zzz");

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>
---
 drivers/mmc/host/sdhci-spear.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 6be89c0..accf4f4 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -320,13 +320,7 @@ static int sdhci_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(sdhci_pm_ops, sdhci_suspend, sdhci_resume);
 
-#ifdef CONFIG_OF
-static const struct of_device_id sdhci_spear_id_table[] = {
-	{ .compatible = "st,spear300-sdhci" },
-	{}
-};
-MODULE_DEVICE_TABLE(of, sdhci_spear_id_table);
-#endif
+of_simple_module_id_table(sdhci_spear_id_table, "st,spear300-sdhci");
 
 static struct platform_driver sdhci_driver = {
 	.driver = {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux