[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559303690-8108-4-git-send-email-info@metux.net>
Date: Fri, 31 May 2019 13:54:50 +0200
From: "Enrico Weigelt, metux IT consult" <info@...ux.net>
To: linux-kernel@...r.kernel.org
Cc: axboe@...nel.dk, herbert@...dor.apana.org.au, davem@...emloft.net,
linux-block@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: [PATCH 3/3] drivers: crypto: picoxcell_crypto: use MODULE_OF_TABLE()
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@...ux.net>
---
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
Powered by blists - more mailing lists