aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/host/pcie-qcom.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-08-24 16:57:48 -0400
committerBjorn Helgaas <bhelgaas@google.com>2016-08-24 18:16:19 -0400
commitf9a6660083385fa329808d0747ea54c62bd9155c (patch)
tree330f942570077772720cb2afcbc4a79239661633 /drivers/pci/host/pcie-qcom.c
parentd29438d64448196065a3dcc34a696599323d6822 (diff)
PCI: qcom: Make explicitly non-modular
This code is not being built as a module by anyone: drivers/pci/host/Kconfig:config PCIE_QCOM drivers/pci/host/Kconfig: bool "Qualcomm PCIe controller" Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(), etc., so that when reading the driver there is no doubt it is builtin-only. The information is preserved in comments at the top of the file. Note that for non-modular code, MODULE_DEVICE_TABLE is a no-op and builtin_platform_driver() uses the same init level priority as module_platform_driver(), so this doesn't change init ordering. Explicitly disallow 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. [bhelgaas: changelog] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Stanimir Varbanov <svarbanov@mm-sol.com>
Diffstat (limited to 'drivers/pci/host/pcie-qcom.c')
-rw-r--r--drivers/pci/host/pcie-qcom.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/pci/host/pcie-qcom.c b/drivers/pci/host/pcie-qcom.c
index f2f90c50f75d..5ec2d440a6b7 100644
--- a/drivers/pci/host/pcie-qcom.c
+++ b/drivers/pci/host/pcie-qcom.c
@@ -1,7 +1,11 @@
1/* 1/*
2 * Qualcomm PCIe root complex driver
3 *
2 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
3 * Copyright 2015 Linaro Limited. 5 * Copyright 2015 Linaro Limited.
4 * 6 *
7 * Author: Stanimir Varbanov <svarbanov@mm-sol.com>
8 *
5 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 and 10 * it under the terms of the GNU General Public License version 2 and
7 * only version 2 as published by the Free Software Foundation. 11 * only version 2 as published by the Free Software Foundation.
@@ -19,7 +23,7 @@
19#include <linux/io.h> 23#include <linux/io.h>
20#include <linux/iopoll.h> 24#include <linux/iopoll.h>
21#include <linux/kernel.h> 25#include <linux/kernel.h>
22#include <linux/module.h> 26#include <linux/init.h>
23#include <linux/of_device.h> 27#include <linux/of_device.h>
24#include <linux/of_gpio.h> 28#include <linux/of_gpio.h>
25#include <linux/pci.h> 29#include <linux/pci.h>
@@ -570,37 +574,19 @@ static int qcom_pcie_probe(struct platform_device *pdev)
570 return 0; 574 return 0;
571} 575}
572 576
573static int qcom_pcie_remove(struct platform_device *pdev)
574{
575 struct qcom_pcie *pcie = platform_get_drvdata(pdev);
576
577 qcom_ep_reset_assert(pcie);
578 phy_power_off(pcie->phy);
579 phy_exit(pcie->phy);
580 pcie->ops->deinit(pcie);
581
582 return 0;
583}
584
585static const struct of_device_id qcom_pcie_match[] = { 577static const struct of_device_id qcom_pcie_match[] = {
586 { .compatible = "qcom,pcie-ipq8064", .data = &ops_v0 }, 578 { .compatible = "qcom,pcie-ipq8064", .data = &ops_v0 },
587 { .compatible = "qcom,pcie-apq8064", .data = &ops_v0 }, 579 { .compatible = "qcom,pcie-apq8064", .data = &ops_v0 },
588 { .compatible = "qcom,pcie-apq8084", .data = &ops_v1 }, 580 { .compatible = "qcom,pcie-apq8084", .data = &ops_v1 },
589 { } 581 { }
590}; 582};
591MODULE_DEVICE_TABLE(of, qcom_pcie_match);
592 583
593static struct platform_driver qcom_pcie_driver = { 584static struct platform_driver qcom_pcie_driver = {
594 .probe = qcom_pcie_probe, 585 .probe = qcom_pcie_probe,
595 .remove = qcom_pcie_remove,
596 .driver = { 586 .driver = {
597 .name = "qcom-pcie", 587 .name = "qcom-pcie",
588 .suppress_bind_attrs = true,
598 .of_match_table = qcom_pcie_match, 589 .of_match_table = qcom_pcie_match,
599 }, 590 },
600}; 591};
601 592builtin_platform_driver(qcom_pcie_driver);
602module_platform_driver(qcom_pcie_driver);
603
604MODULE_AUTHOR("Stanimir Varbanov <svarbanov@mm-sol.com>");
605MODULE_DESCRIPTION("Qualcomm PCIe root complex driver");
606MODULE_LICENSE("GPL v2");