Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}