diff options
Diffstat (limited to 'drivers/base/component.c')
-rw-r--r-- | drivers/base/component.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/component.c b/drivers/base/component.c index 5e79299f6c3f..2d25a6416587 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -9,7 +9,6 @@ */ #include <linux/component.h> #include <linux/device.h> -#include <linux/kref.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/slab.h> @@ -246,7 +245,7 @@ static int try_to_bring_up_master(struct master *master, return 0; } - if (!devres_open_group(master->parent, NULL, GFP_KERNEL)) + if (!devres_open_group(master->parent, master, GFP_KERNEL)) return -ENOMEM; /* Found all components */ @@ -258,6 +257,7 @@ static int try_to_bring_up_master(struct master *master, return ret; } + devres_close_group(master->parent, NULL); master->bound = true; return 1; } @@ -282,7 +282,7 @@ static void take_down_master(struct master *master) { if (master->bound) { master->ops->unbind(master->parent); - devres_release_group(master->parent, NULL); + devres_release_group(master->parent, master); master->bound = false; } } |