Thread (13 messages) flat view 13 messages, 6 authors, 2011-06-13
STALE5562d

[PATCH 4/4] ARM: pmu: add platform_device_id table support

From: mark.rutland@arm.com (Mark Rutland)
Date: 2011-06-13 12:41:08

Hi,
-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov at mvista.com]
Sent: 13 June 2011 13:33
To: Mark Rutland
Cc: Rob Herring; Jamie Iles; Will Deacon; linux-arm-
kernel at lists.infradead.org
Subject: Re: [PATCH 4/4] ARM: pmu: add platform_device_id table support

Hello.

On 13-06-2011 13:35, Mark Rutland wrote:
quoted
This patch adds support for platform_device_id tables, allowing new
PMU types to be registered with the correct type, without requiring
new platform_driver shims to provide the type.
quoted
Macros matching functionality of the of_device_id table macros are
provided for convenience.
quoted
Cc: Jamie Iles<redacted>
Cc: Will Deacon<redacted>
---
  arch/arm/kernel/pmu.c |   19 +++++++++++++++++++
  1 files changed, 19 insertions(+), 0 deletions(-)
quoted
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c
index d34cf88..23c3af2 100644
--- a/arch/arm/kernel/pmu.c
+++ b/arch/arm/kernel/pmu.c
[...]
quoted
@@ -73,6 +86,11 @@ enum arm_pmu_type armpmu_device_type(struct
platform_device *pdev)
quoted
  		return (enum arm_pmu_type) of_id->data;
  	}

+	/* Provided by platform_device_id table */
+	if ((pdev_id = platform_get_device_id(pdev))) {
    scripts/checkpatch.pl should warn about using = in the *if*
statement...
quoted
+		return (enum arm_pmu_type) pdev_id->driver_data;
+	}
    scripts/checkpatch.pl should warn about unneeded {} here.
    Did you run your patch thru it?

WBR, Sergei
Thanks, will fix in v2 along with any other issues.

Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help