Skip to content

Commit

Permalink
mfd: cros_ec_dev: Add missing mfd_remove_devices() call in remove
Browse files Browse the repository at this point in the history
The driver adds different MFD child devices via mfd_add_devices() and
hence it is required to call mfd_remove_devices() to remove MFD child
devices.

Fixes: 5e01155 ("cros_ec: Move cros_ec_dev module to drivers/mfd")
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Enric Balletbo i Serra authored and Lee Jones committed Jan 3, 2019
1 parent ea90e7b commit 18e294d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mfd/cros_ec_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ static int ec_device_remove(struct platform_device *pdev)

cros_ec_debugfs_remove(ec);

mfd_remove_devices(ec->dev);
cdev_del(&ec->cdev);
device_unregister(&ec->class_dev);
return 0;
Expand Down

0 comments on commit 18e294d

Please sign in to comment.