diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 21:15:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 21:15:41 -0400 |
commit | 5dfb66ba8c4a96eb732942c9f78629e4db1a51d4 (patch) | |
tree | d443adb4d02ac2599baf402698a589a9b814e478 /include/linux | |
parent | 1d9b9f6a53d77ed801ba875f937d6dabbfc381ce (diff) | |
parent | 424f525a1241351da947fb48a938128ddd774511 (diff) |
Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
* 'for-linus' of git://git.o-hand.com/linux-mfd:
mfd: accept pure device as a parent, not only platform_device
mfd: add platform_data to mfd_cell
mfd: Coding style fixes
mfd: Use to_platform_device instead of container_of
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/core.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index bb3dd0545928..49ef857cdb2d 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -1,5 +1,3 @@ | |||
1 | #ifndef MFD_CORE_H | ||
2 | #define MFD_CORE_H | ||
3 | /* | 1 | /* |
4 | * drivers/mfd/mfd-core.h | 2 | * drivers/mfd/mfd-core.h |
5 | * | 3 | * |
@@ -13,6 +11,9 @@ | |||
13 | * | 11 | * |
14 | */ | 12 | */ |
15 | 13 | ||
14 | #ifndef MFD_CORE_H | ||
15 | #define MFD_CORE_H | ||
16 | |||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | 18 | ||
18 | /* | 19 | /* |
@@ -28,7 +29,13 @@ struct mfd_cell { | |||
28 | int (*suspend)(struct platform_device *dev); | 29 | int (*suspend)(struct platform_device *dev); |
29 | int (*resume)(struct platform_device *dev); | 30 | int (*resume)(struct platform_device *dev); |
30 | 31 | ||
31 | void *driver_data; /* driver-specific data */ | 32 | /* driver-specific data for MFD-aware "cell" drivers */ |
33 | void *driver_data; | ||
34 | |||
35 | /* platform_data can be used to either pass data to "generic" | ||
36 | driver or as a hook to mfd_cell for the "cell" drivers */ | ||
37 | void *platform_data; | ||
38 | size_t data_size; | ||
32 | 39 | ||
33 | /* | 40 | /* |
34 | * This resources can be specified relatievly to the parent device. | 41 | * This resources can be specified relatievly to the parent device. |
@@ -38,18 +45,11 @@ struct mfd_cell { | |||
38 | const struct resource *resources; | 45 | const struct resource *resources; |
39 | }; | 46 | }; |
40 | 47 | ||
41 | static inline struct mfd_cell * | 48 | extern int mfd_add_devices(struct device *parent, int id, |
42 | mfd_get_cell(struct platform_device *pdev) | 49 | const struct mfd_cell *cells, int n_devs, |
43 | { | 50 | struct resource *mem_base, |
44 | return (struct mfd_cell *)pdev->dev.platform_data; | 51 | int irq_base); |
45 | } | ||
46 | |||
47 | extern int mfd_add_devices( | ||
48 | struct platform_device *parent, | ||
49 | const struct mfd_cell *cells, int n_devs, | ||
50 | struct resource *mem_base, | ||
51 | int irq_base); | ||
52 | 52 | ||
53 | extern void mfd_remove_devices(struct platform_device *parent); | 53 | extern void mfd_remove_devices(struct device *parent); |
54 | 54 | ||
55 | #endif | 55 | #endif |