lkml.org 
[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1] platform/x86: intel_pmc_core: Introduce PMC_DEVICE() macro
Date
Instead of open coding PCI_VDEVICE() and some of its parameters,
introduce new macro and use it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/intel_pmc_core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 17e08b42b0a9..5944ae9b97ef 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -119,10 +119,11 @@ static const struct pmc_reg_map spt_reg_map = {
.pm_read_disable_bit = SPT_PMC_READ_DISABLE_BIT,
};

+#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
+
static const struct pci_device_id pmc_pci_ids[] = {
- { PCI_VDEVICE(INTEL, SPT_PMC_PCI_DEVICE_ID),
- (kernel_ulong_t)&spt_reg_map },
- { 0, },
+ PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
+ {}
};

static inline u8 pmc_core_reg_read_byte(struct pmc_dev *pmcdev, int offset)
--
2.15.0
\
 
 \ /
  Last update: 2017-12-12 10:52    [W:0.066 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site