Skip to content

Commit

Permalink
mfd: Use to_platform_device instead of container_of
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks authored and Samuel Ortiz committed Jul 28, 2008
1 parent c9272c4 commit 96ee419
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mfd/mfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 96ee419

Please sign in to comment.