diff options
author | Andy Whitcroft <apw@canonical.com> | 2012-05-17 18:55:28 +0100 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2012-11-14 18:19:35 -0700 |
commit | 40fe9dba4c638934e9ff70dddd1f179f62905ba5 (patch) | |
tree | 703af897a80deb00dda98ce32dde2eb610049172 | |
parent | ef5c232e47b3e0799555dad63c2c61dd0fb66447 (diff) |
UBUNTU: SAUCE: ata_piix: add a disable_driver option
We need to be able to fully disable the ata_piix driver from the kernel
command line. Add a generic disable_driver to the module init to
completely short circuit the initialisation.
BugLink: http://bugs.launchpad.net/bugs/994870
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
-rw-r--r-- | drivers/ata/ata_piix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index ef773e12af7..f66b1f0daae 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -1727,10 +1727,16 @@ static void piix_remove_one(struct pci_dev *pdev) ata_pci_remove_one(pdev); } +static bool disable_driver = 0; static int __init piix_init(void) { int rc; + if (disable_driver) { + printk(KERN_WARNING "ata_piix: driver disabled completely\n"); + return 0; + } + DPRINTK("pci_register_driver\n"); rc = pci_register_driver(&piix_pci_driver); if (rc) @@ -1747,5 +1753,6 @@ static void __exit piix_exit(void) pci_unregister_driver(&piix_pci_driver); } +module_param(disable_driver, bool, 0); module_init(piix_init); module_exit(piix_exit); |