summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohn Bonesio <bones@secretlab.ca>2011-10-24 11:09:06 +0200
committerGrant Likely <grant.likely@secretlab.ca>2011-10-24 23:49:00 +0200
commit0b4ae4cceaf3cea9b154a6301e486fb5bc16aef2 (patch)
tree8bcc9ee8905deb663b6a333bb0930db90c4601ad /include/linux
parent2b0fce8da2f5b6dc9661be540982416a9e2267f8 (diff)
dt: Add id to AUXDATA structure
This patch adds the ability to set the device id in the AUXDATA structure for those few device drivers that just have to have a statically defined device id. Signed-off-by: John Bonesio <bones@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/of_platform.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 5a6f458a4bb..0c53ecbd937 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -45,13 +45,18 @@ struct of_dev_auxdata {
char *compatible;
resource_size_t phys_addr;
char *name;
+ int id;
void *platform_data;
};
/* Macro to simplify populating a lookup table */
#define OF_DEV_AUXDATA(_compat,_phys,_name,_pdata) \
{ .compatible = _compat, .phys_addr = _phys, .name = _name, \
- .platform_data = _pdata }
+ .id = -1, .platform_data = _pdata }
+
+#define OF_DEV_AUXDATA_ID(_compat,_phys,_name,_id,_pdata) \
+ { .compatible = _compat, .phys_addr = _phys, .name = _name, \
+ .id = _id, .platform_data = _pdata }
/**
* of_platform_driver - Legacy of-aware driver for platform devices.