[PATCH 3/3] drivers: crypto: picoxcell_crypto: use MODULE_OF_TABLE()

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

 



Using MODULE_OF_TABLE() macro to get rid of some #ifdef
CONFIG_OF and thus make the code a bit slimmer.

These macros already check whether CONFIG_OF is set and if it's
not, just no-op. The compiler then should be able to optimize-
away unreferenced structs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@xxxxxxxxx>
---
 drivers/crypto/picoxcell_crypto.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index 05b89e7..e637f6f 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1625,14 +1625,12 @@ static DEVICE_ATTR(stat_irq_thresh, 0644, spacc_stat_irq_thresh_show,
 	},
 };
 
-#ifdef CONFIG_OF
 static const struct of_device_id spacc_of_id_table[] = {
 	{ .compatible = "picochip,spacc-ipsec" },
 	{ .compatible = "picochip,spacc-l2" },
 	{}
 };
-MODULE_DEVICE_TABLE(of, spacc_of_id_table);
-#endif /* CONFIG_OF */
+MODULE_OF_TABLE(spacc_of_id_table);
 
 static int spacc_probe(struct platform_device *pdev)
 {
-- 
1.9.1




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux