mfd: Use to_platform_device instead of container_of
[pandora-kernel.git] / drivers / mfd / mfd-core.c
index 0454be4..4dc861a 100644 (file)
@@ -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;
 }