diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-29 18:39:05 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-03 22:59:25 +0100 |
commit | 1e95e3b2da424db68d0a465273f1901a990c6277 (patch) | |
tree | 81e2fffc99ee694bfda81302ee818b22a6f21358 /drivers/base | |
parent | 766bb53c015bcc28dbd5ceb7c004581af7ab51b2 (diff) | |
download | linux-stable-1e95e3b2da424db68d0a465273f1901a990c6277.tar.gz linux-stable-1e95e3b2da424db68d0a465273f1901a990c6277.tar.bz2 linux-stable-1e95e3b2da424db68d0a465273f1901a990c6277.zip |
PM: Convert dev_pm_put_subsys_data() into a void function
Clients using the dev_pm_put_subsys_data() API isn't interested of a
return value. They care only of decreasing a reference to the device's
pm_subsys_data. So, let's convert the API to a void function, which
anyway seems like reasonable thing to do.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/common.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index a1ee51d43da1..f32b802b98f4 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c @@ -56,13 +56,11 @@ EXPORT_SYMBOL_GPL(dev_pm_get_subsys_data); * @dev: Device to handle. * * If the reference counter of power.subsys_data is zero after dropping the - * reference, power.subsys_data is removed. Return 1 if that happens or 0 - * otherwise. + * reference, power.subsys_data is removed. */ -int dev_pm_put_subsys_data(struct device *dev) +void dev_pm_put_subsys_data(struct device *dev) { struct pm_subsys_data *psd; - int ret = 1; spin_lock_irq(&dev->power.lock); @@ -70,18 +68,14 @@ int dev_pm_put_subsys_data(struct device *dev) if (!psd) goto out; - if (--psd->refcount == 0) { + if (--psd->refcount == 0) dev->power.subsys_data = NULL; - } else { + else psd = NULL; - ret = 0; - } out: spin_unlock_irq(&dev->power.lock); kfree(psd); - - return ret; } EXPORT_SYMBOL_GPL(dev_pm_put_subsys_data); |