diff options
| author | Kumar Gala <galak@linen.sps.mot.com> | 2004-12-16 22:11:24 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-12-16 22:11:24 -0800 |
| commit | b1cbc1086d663905c0e5775f3f5f28239f6c505e (patch) | |
| tree | 3ae6366a4581629d64648a58853cb808c7498757 /include/linux/device.h | |
| parent | dd96557809ebcfaeb6055045c2e4ce8bddb5a1a3 (diff) | |
[PATCH] Driver Core: Add platform_get_resource_byname & platform_get_resource_byirq
Adds the ability to find a resource or irq on a platform device by its
resource name. This patch also tweaks how resource names get set.
Before, resources names were set to pdev->dev.bus_id, now that only
happens if the resource name has not been previous set.
All of this allows us to find a resource without assuming what order the
resources are in.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index c64cec37dd69..d885723a2c3a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -382,6 +382,8 @@ extern struct device platform_bus; extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); extern int platform_get_irq(struct platform_device *, unsigned int); +extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *); +extern int platform_get_irq_byname(struct platform_device *, char *); extern int platform_add_devices(struct platform_device **, int); extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int); |
