Commit 96ee4199 authored by Ben Dooks's avatar Ben Dooks Committed by Samuel Ortiz

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: default avatarBen Dooks <ben-linux@fluff.org>
Acked-by: default avatarDmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@openedhand.com>
parent c9272c4f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment