From 4f00f1c22652801c463f8a3d5843cffda96fb09c Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 5 Jun 2003 01:18:21 +0100 Subject: [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. --- include/linux/device.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') 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 *); -- cgit v1.2.3