public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] platform/x86: intel_pmc_core: Introduce PMC_DEVICE() macro
@ 2017-12-12  9:50 Andy Shevchenko
  2017-12-12 10:02 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2017-12-12  9:50 UTC (permalink / raw)
  To: Will Deacon, Dave Martin, Philippe Ombredanne, linux-kernel,
	Andrew Morton
  Cc: Andy Shevchenko

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-14 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-12  9:50 [PATCH v1] platform/x86: intel_pmc_core: Introduce PMC_DEVICE() macro Andy Shevchenko
2017-12-12 10:02 ` Andy Shevchenko
2017-12-14 21:21 ` kbuild test robot
2017-12-14 21:29 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox