mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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 <ben-linux@fluff.org> Acked-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
This commit is contained in:
parent
c9272c4f9f
commit
96ee41993b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user