diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-09-09 06:54:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:51:07 -0400 |
commit | 1359555eb77d240b7c1d7ee75bb07e89e89770e4 (patch) | |
tree | 62ee852622700d23dffa7593c84420762e07147f /include/linux/platform_device.h | |
parent | 44b760a825fae65629fb04b1deeab68c6bef5c50 (diff) |
Driver core: Make platform_device.id an int
While platform_device.id is a u32, platform_device_add() handles "-1"
as a special id value. This has potential for confusion and bugs.
Making it an int instead should prevent problems from happening in
the future.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r-- | include/linux/platform_device.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 8bbd459eafdc..e80804316cdb 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | struct platform_device { | 16 | struct platform_device { |
17 | const char * name; | 17 | const char * name; |
18 | u32 id; | 18 | int id; |
19 | struct device dev; | 19 | struct device dev; |
20 | u32 num_resources; | 20 | u32 num_resources; |
21 | struct resource * resource; | 21 | struct resource * resource; |
@@ -35,9 +35,10 @@ extern struct resource *platform_get_resource_byname(struct platform_device *, u | |||
35 | extern int platform_get_irq_byname(struct platform_device *, char *); | 35 | extern int platform_get_irq_byname(struct platform_device *, char *); |
36 | extern int platform_add_devices(struct platform_device **, int); | 36 | extern int platform_add_devices(struct platform_device **, int); |
37 | 37 | ||
38 | extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int); | 38 | extern struct platform_device *platform_device_register_simple(char *, int id, |
39 | struct resource *, unsigned int); | ||
39 | 40 | ||
40 | extern struct platform_device *platform_device_alloc(const char *name, unsigned int id); | 41 | extern struct platform_device *platform_device_alloc(const char *name, int id); |
41 | extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); | 42 | extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); |
42 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); | 43 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); |
43 | extern int platform_device_add(struct platform_device *pdev); | 44 | extern int platform_device_add(struct platform_device *pdev); |