diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-08-24 16:57:45 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-24 17:56:12 -0400 |
commit | d7def20400773c7c0be8dcee58434ddbb0f6f8d9 (patch) | |
tree | 623187c2b20b42be83fa91625245a92d2687c033 | |
parent | 61612e6dd49d08e174e12f9aca58a4aca297609b (diff) |
PCI/PME: Make explicitly non-modular
This code is not being built as a module by anyone:
config PCIE_PME
def_bool y
depends on PCIEPORTBUS && PM
Remove traces of modularity so that when reading the driver there is no
doubt it is builtin-only.
Also delete the .remove function, since that doesn't seem to have a
sensible use case. With "normal" endpoint drivers, we have in the past set
the suppress_bind_attrs bit to make it clear that the use of ".remove" in a
builtin driver was deleted, but here for PCI, it seems overkill to jump
through the pcie_port_service_driver and into the struct device_driver in
order to finally try and do something similar with the bind setting.
Note that for non-modular code, module_init() translates to
device_initcall().
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/pcie/pme.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index 1ae4c73e7a3c..884bad5320f8 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
@@ -449,17 +448,6 @@ static int pcie_pme_resume(struct pcie_device *srv) | |||
449 | return 0; | 448 | return 0; |
450 | } | 449 | } |
451 | 450 | ||
452 | /** | ||
453 | * pcie_pme_remove - Prepare PCIe PME service device for removal. | ||
454 | * @srv - PCIe service device to remove. | ||
455 | */ | ||
456 | static void pcie_pme_remove(struct pcie_device *srv) | ||
457 | { | ||
458 | pcie_pme_suspend(srv); | ||
459 | free_irq(srv->irq, srv); | ||
460 | kfree(get_service_data(srv)); | ||
461 | } | ||
462 | |||
463 | static struct pcie_port_service_driver pcie_pme_driver = { | 451 | static struct pcie_port_service_driver pcie_pme_driver = { |
464 | .name = "pcie_pme", | 452 | .name = "pcie_pme", |
465 | .port_type = PCI_EXP_TYPE_ROOT_PORT, | 453 | .port_type = PCI_EXP_TYPE_ROOT_PORT, |
@@ -468,7 +456,6 @@ static struct pcie_port_service_driver pcie_pme_driver = { | |||
468 | .probe = pcie_pme_probe, | 456 | .probe = pcie_pme_probe, |
469 | .suspend = pcie_pme_suspend, | 457 | .suspend = pcie_pme_suspend, |
470 | .resume = pcie_pme_resume, | 458 | .resume = pcie_pme_resume, |
471 | .remove = pcie_pme_remove, | ||
472 | }; | 459 | }; |
473 | 460 | ||
474 | /** | 461 | /** |
@@ -478,5 +465,4 @@ static int __init pcie_pme_service_init(void) | |||
478 | { | 465 | { |
479 | return pcie_port_service_register(&pcie_pme_driver); | 466 | return pcie_port_service_register(&pcie_pme_driver); |
480 | } | 467 | } |
481 | 468 | device_initcall(pcie_pme_service_init); | |
482 | module_init(pcie_pme_service_init); | ||