summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/mfd-core.c3
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;
}