From: Ben Dooks Date: Mon, 28 Jul 2008 16:26:42 +0000 (+0200) Subject: mfd: Use to_platform_device instead of container_of X-Git-Tag: v2.6.27-rc1~2^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=96ee41993b5b25ee0fbde2d4dcaac1f8c5ef5cc4;p=linux-2.6-omap-h63xx.git 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: Ben Dooks Acked-by: Dmitry Baryshkov Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0454be4266c..4dc861a7ac5 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; }