BugLink: http://bugs.launchpad.net/bugs/1730770
Allow the driver to be a module since builtin_pci_driver funtionality is no
longer needed.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(cherry picked from commit
2854a0aa822c11ea8538ebfe94a62e20ab570e2b)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
If you are running on a Galileo/Quark say Y here.
config INTEL_PMC_CORE
If you are running on a Galileo/Quark say Y here.
config INTEL_PMC_CORE
- bool "Intel PMC Core driver"
+ tristate "Intel PMC Core driver"
depends on PCI
---help---
The Intel Platform Controller Hub for Intel Core SoCs provides access
depends on PCI
---help---
The Intel Platform Controller Hub for Intel Core SoCs provides access
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/device.h>
+#include <linux/module.h>
#include <linux/pci.h>
#include <linux/uaccess.h>
#include <linux/pci.h>
#include <linux/uaccess.h>
(kernel_ulong_t)&spt_reg_map },
{ 0, },
};
(kernel_ulong_t)&spt_reg_map },
{ 0, },
};
+MODULE_DEVICE_TABLE(pci, pmc_pci_ids);
static inline u8 pmc_core_reg_read_byte(struct pmc_dev *pmcdev, int offset)
{
static inline u8 pmc_core_reg_read_byte(struct pmc_dev *pmcdev, int offset)
{
+static void pmc_core_remove(struct pci_dev *dev)
+{
+ pmc_core_dbgfs_unregister(&pmc);
+ mutex_destroy(&pmc.lock);
+}
+
static struct pci_driver intel_pmc_core_driver = {
.name = "intel_pmc_core",
.id_table = pmc_pci_ids,
.probe = pmc_core_probe,
static struct pci_driver intel_pmc_core_driver = {
.name = "intel_pmc_core",
.id_table = pmc_pci_ids,
.probe = pmc_core_probe,
+ .remove = pmc_core_remove,
-builtin_pci_driver(intel_pmc_core_driver);
+module_pci_driver(intel_pmc_core_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Intel PMC Core Driver");