diff options
author | Mike Rapoport <mike@compulab.co.il> | 2008-07-29 03:23:32 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@openedhand.com> | 2008-07-29 03:23:32 +0400 |
commit | 56edb58be157a06dc147a988af3588059556d392 (patch) | |
tree | 3771389d15ef26bf40ac19f8abd0d39454dc6db6 /include/linux | |
parent | 7f71ac9374fec066e428892a68db158946cee1fb (diff) | |
download | linux-56edb58be157a06dc147a988af3588059556d392.tar.xz |
mfd: add platform_data to mfd_cell
Adding platform_data to mfd_cell allows passing of platform data directly
to the platform_device created for each cell and thus reuse of existing
drivers.
On the other side it can be used as a hook to mfd_cell itself
removing the need in mfd_get_cell method.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/core.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index b7cbb9968339..ea45d4a5a2ac 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -29,7 +29,13 @@ struct mfd_cell { int (*suspend)(struct platform_device *dev); int (*resume)(struct platform_device *dev); - void *driver_data; /* driver-specific data */ + /* driver-specific data for MFD-aware "cell" drivers */ + void *driver_data; + + /* platform_data can be used to either pass data to "generic" + driver or as a hook to mfd_cell for the "cell" drivers */ + void *platform_data; + size_t data_size; /* * This resources can be specified relatievly to the parent device. @@ -39,11 +45,6 @@ struct mfd_cell { const struct resource *resources; }; -static inline struct mfd_cell *mfd_get_cell(struct platform_device *pdev) -{ - return (struct mfd_cell *)pdev->dev.platform_data; -} - extern int mfd_add_devices(struct platform_device *parent, const struct mfd_cell *cells, int n_devs, struct resource *mem_base, |