summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2003-06-05 01:18:21 +0100
committerRussell King <rmk@flint.arm.linux.org.uk>2003-06-05 01:18:21 +0100
commit4f00f1c22652801c463f8a3d5843cffda96fb09c (patch)
treec2befe99034b4927f8a95fe9bd6a34cbd52c6c6b /include/linux
parent9ae27c57b7fb921015a8a45ed71523bcdc92a5e8 (diff)
[ARM] Convert platform devices to use platform_device
Since struct platform_device now has the ability to pass resources, defined by the platform to the device driver, we can now use this to handle platform specific devices. One such instance is the StrongARM SA1111 companion chip, which can appear in various address spaces, and connected to different IRQ lines depending on how many cups of coffee the hardware designer had, the direction of the wind outside the designers office that day. We also convert some of the other StrongARM peripheral on-chip devices to use struct platform_device. ARM also provides a platform_add_devices() function which can be used by platform code to bulk-register a tabular set of platform devices.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 8e3f1919d974..577ac546e48d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -385,6 +385,8 @@ struct platform_device {
struct resource * resource;
};
+#define to_platform_device(x) container_of((x), struct platform_device, dev)
+
extern int platform_device_register(struct platform_device *);
extern void platform_device_unregister(struct platform_device *);