diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-08 07:21:31 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-21 18:28:38 -0400 |
commit | d7aacaddcac3971e33cf52d7e610c06696cb347f (patch) | |
tree | 2f34e6b48f5cc1224bdefd721bba108c43aad34b /arch | |
parent | aea1f7964ae6cba5eb419a958956deb9016b3341 (diff) |
Driver Core: Add platform device arch data V3
Allow architecture specific data in struct platform_device V3.
With this patch struct pdev_archdata is added to struct
platform_device, similar to struct dev_archdata in found in
struct device. Useful for architecture code that needs to
keep extra data associated with each platform device.
Struct pdev_archdata is different from dev.platform_data, the
convention is that dev.platform_data points to driver-specific
data. It may or may not be required by the driver. The format
of this depends on driver but is the same across architectures.
The structure pdev_archdata is a place for architecture specific
data. This data is handled by architecture specific code (for
example runtime PM), and since it is architecture specific it
should _never_ be touched by device driver code. Exactly like
struct dev_archdata but for platform devices.
[rjw: This change is for power management mostly and that's why it
goes through the suspend tree.]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/device.h | 3 | ||||
-rw-r--r-- | arch/ia64/include/asm/device.h | 3 | ||||
-rw-r--r-- | arch/microblaze/include/asm/device.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/device.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/device.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/device.h | 3 |
6 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h index c61642b40603..9f390ce335cb 100644 --- a/arch/arm/include/asm/device.h +++ b/arch/arm/include/asm/device.h | |||
@@ -12,4 +12,7 @@ struct dev_archdata { | |||
12 | #endif | 12 | #endif |
13 | }; | 13 | }; |
14 | 14 | ||
15 | struct pdev_archdata { | ||
16 | }; | ||
17 | |||
15 | #endif | 18 | #endif |
diff --git a/arch/ia64/include/asm/device.h b/arch/ia64/include/asm/device.h index 41ab85d66f33..d66d446b127c 100644 --- a/arch/ia64/include/asm/device.h +++ b/arch/ia64/include/asm/device.h | |||
@@ -15,4 +15,7 @@ struct dev_archdata { | |||
15 | #endif | 15 | #endif |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct pdev_archdata { | ||
19 | }; | ||
20 | |||
18 | #endif /* _ASM_IA64_DEVICE_H */ | 21 | #endif /* _ASM_IA64_DEVICE_H */ |
diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h index c042830793ed..30286db27c1c 100644 --- a/arch/microblaze/include/asm/device.h +++ b/arch/microblaze/include/asm/device.h | |||
@@ -16,6 +16,9 @@ struct dev_archdata { | |||
16 | struct device_node *of_node; | 16 | struct device_node *of_node; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct pdev_archdata { | ||
20 | }; | ||
21 | |||
19 | #endif /* _ASM_MICROBLAZE_DEVICE_H */ | 22 | #endif /* _ASM_MICROBLAZE_DEVICE_H */ |
20 | 23 | ||
21 | 24 | ||
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h index 7d2277cef09a..e3e06e0f7fc0 100644 --- a/arch/powerpc/include/asm/device.h +++ b/arch/powerpc/include/asm/device.h | |||
@@ -30,4 +30,7 @@ dev_archdata_get_node(const struct dev_archdata *ad) | |||
30 | return ad->of_node; | 30 | return ad->of_node; |
31 | } | 31 | } |
32 | 32 | ||
33 | struct pdev_archdata { | ||
34 | }; | ||
35 | |||
33 | #endif /* _ASM_POWERPC_DEVICE_H */ | 36 | #endif /* _ASM_POWERPC_DEVICE_H */ |
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h index 3702e087df2c..f3b85b6b0b76 100644 --- a/arch/sparc/include/asm/device.h +++ b/arch/sparc/include/asm/device.h | |||
@@ -32,4 +32,7 @@ dev_archdata_get_node(const struct dev_archdata *ad) | |||
32 | return ad->prom_node; | 32 | return ad->prom_node; |
33 | } | 33 | } |
34 | 34 | ||
35 | struct pdev_archdata { | ||
36 | }; | ||
37 | |||
35 | #endif /* _ASM_SPARC_DEVICE_H */ | 38 | #endif /* _ASM_SPARC_DEVICE_H */ |
diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h index 4994a20acbcb..cee34e9ca45b 100644 --- a/arch/x86/include/asm/device.h +++ b/arch/x86/include/asm/device.h | |||
@@ -13,4 +13,7 @@ struct dma_map_ops *dma_ops; | |||
13 | #endif | 13 | #endif |
14 | }; | 14 | }; |
15 | 15 | ||
16 | struct pdev_archdata { | ||
17 | }; | ||
18 | |||
16 | #endif /* _ASM_X86_DEVICE_H */ | 19 | #endif /* _ASM_X86_DEVICE_H */ |