lkml.org 
[lkml]   [2008]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/4] MFD: Use to_platform_device instead of container_of.
2008/7/9 Ben Dooks <ben-linux@fluff.org>:
> 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>

>
> Index: linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c
> ===================================================================
> --- linux-2.6.26-rc9-next20080709.orig/drivers/mfd/mfd-core.c 2008-07-09 10:13:53.000000000 +0100
> +++ linux-2.6.26-rc9-next20080709/drivers/mfd/mfd-core.c 2008-07-09 10:14:26.000000000 +0100
> @@ -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;
> }
>
>
> --
>



--
With best wishes
Dmitry


\
 
 \ /
  Last update: 2008-07-09 13:13    [W:0.160 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site