提交 96ee4199 编写于 作者: B Ben Dooks 提交者: 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: NBen Dooks <ben-linux@fluff.org>
Acked-by: NDmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: NSamuel Ortiz <sameo@openedhand.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册