lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1576702137-25905-16-git-send-email-paul.gortmaker@windriver.com>
Date:   Wed, 18 Dec 2019 15:48:54 -0500
From:   Paul Gortmaker <paul.gortmaker@...driver.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     linux-kernel@...r.kernel.org,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Tony Lindgren <tony@...mide.com>,
        Keshava Munegowda <keshava_mgowda@...com>,
        Roger Quadros <rogerq@...com>, linux-omap@...r.kernel.org
Subject: [PATCH 15/18] mfd: omap-usb-tll: Make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_OMAP_USB_HOST
drivers/mfd/Kconfig:    bool "TI OMAP USBHS core and TLL driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Tony Lindgren <tony@...mide.com>
Cc: Lee Jones <lee.jones@...aro.org>
Cc: Keshava Munegowda <keshava_mgowda@...com>
Cc: Roger Quadros <rogerq@...com>
Cc: linux-omap@...r.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
 drivers/mfd/omap-usb-tll.c | 47 ++++------------------------------------------
 1 file changed, 4 insertions(+), 43 deletions(-)

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 265f5e350e1c..77c8d98a6731 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -7,7 +7,7 @@
  * Author: Roger Quadros <rogerq@...com>
  */
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
@@ -269,46 +269,18 @@ static int usbtll_omap_probe(struct platform_device *pdev)
 	return 0;
 }
 
-/**
- * usbtll_omap_remove - shutdown processing for UHH & TLL HCDs
- * @pdev: USB Host Controller being removed
- *
- * Reverses the effect of usbtll_omap_probe().
- */
-static int usbtll_omap_remove(struct platform_device *pdev)
-{
-	struct usbtll_omap *tll = platform_get_drvdata(pdev);
-	int i;
-
-	spin_lock(&tll_lock);
-	tll_dev = NULL;
-	spin_unlock(&tll_lock);
-
-	for (i = 0; i < tll->nch; i++) {
-		if (!IS_ERR(tll->ch_clk[i])) {
-			clk_unprepare(tll->ch_clk[i]);
-			clk_put(tll->ch_clk[i]);
-		}
-	}
-
-	pm_runtime_disable(&pdev->dev);
-	return 0;
-}
-
 static const struct of_device_id usbtll_omap_dt_ids[] = {
 	{ .compatible = "ti,usbhs-tll" },
 	{ }
 };
 
-MODULE_DEVICE_TABLE(of, usbtll_omap_dt_ids);
-
 static struct platform_driver usbtll_omap_driver = {
 	.driver = {
-		.name		= (char *)usbtll_driver_name,
-		.of_match_table = usbtll_omap_dt_ids,
+		.name			= (char *)usbtll_driver_name,
+		.of_match_table		= usbtll_omap_dt_ids,
+		.suppress_bind_attrs	= true,
 	},
 	.probe		= usbtll_omap_probe,
-	.remove		= usbtll_omap_remove,
 };
 
 int omap_tll_init(struct usbhs_omap_platform_data *pdata)
@@ -446,11 +418,6 @@ int omap_tll_disable(struct usbhs_omap_platform_data *pdata)
 }
 EXPORT_SYMBOL_GPL(omap_tll_disable);
 
-MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@...com>");
-MODULE_AUTHOR("Roger Quadros <rogerq@...com>");
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers");
-
 static int __init omap_usbtll_drvinit(void)
 {
 	return platform_driver_register(&usbtll_omap_driver);
@@ -462,9 +429,3 @@ static int __init omap_usbtll_drvinit(void)
  * the usbhs core driver probe function is called.
  */
 fs_initcall(omap_usbtll_drvinit);
-
-static void __exit omap_usbtll_drvexit(void)
-{
-	platform_driver_unregister(&usbtll_omap_driver);
-}
-module_exit(omap_usbtll_drvexit);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ