diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-28 18:26:42 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@openedhand.com> | 2008-07-28 18:26:42 +0200 |
commit | 96ee41993b5b25ee0fbde2d4dcaac1f8c5ef5cc4 (patch) | |
tree | a0a505a06dd75d98885af9b45cebe3ff585410f4 /drivers/mfd/mfd-core.c | |
parent | c9272c4f9fbe2087beb3392f526dc5b19efaa56b (diff) | |
download | lwn-96ee41993b5b25ee0fbde2d4dcaac1f8c5ef5cc4.tar.gz lwn-96ee41993b5b25ee0fbde2d4dcaac1f8c5ef5cc4.zip |
mfd: Use to_platform_device instead of container_of
Convert mfd_remove_devices_fn() to use to_platform_device()
instead of doing container_of().
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Diffstat (limited to 'drivers/mfd/mfd-core.c')
-rw-r--r-- | drivers/mfd/mfd-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0454be4266c1..4dc861a7ac56 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -99,8 +99,7 @@ EXPORT_SYMBOL(mfd_add_devices); static int mfd_remove_devices_fn(struct device *dev, void *unused) { - platform_device_unregister( - container_of(dev, struct platform_device, dev)); + platform_device_unregister(to_platform_device(dev)); return 0; } |