summaryrefslogtreecommitdiff
path: root/drivers/base/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/clock_ops.c4
-rw-r--r--drivers/base/power/common.c4
-rw-r--r--drivers/base/power/qos.c10
-rw-r--r--drivers/base/power/wakeirq.c4
-rw-r--r--drivers/base/power/wakeup.c2
-rw-r--r--drivers/base/power/wakeup_stats.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index b69bcb37c830..59bb37e8244c 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -201,7 +201,7 @@ static int __pm_clk_add(struct device *dev, const char *con_id,
if (!psd)
return -EINVAL;
- ce = kzalloc(sizeof(*ce), GFP_KERNEL);
+ ce = kzalloc_obj(*ce);
if (!ce)
return -ENOMEM;
@@ -282,7 +282,7 @@ int of_pm_clk_add_clks(struct device *dev)
if (count <= 0)
return -ENODEV;
- clks = kcalloc(count, sizeof(*clks), GFP_KERNEL);
+ clks = kzalloc_objs(*clks, count);
if (!clks)
return -ENOMEM;
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index 6ecf9ce4a4e6..9bef9248a705 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -27,7 +27,7 @@ int dev_pm_get_subsys_data(struct device *dev)
{
struct pm_subsys_data *psd;
- psd = kzalloc(sizeof(*psd), GFP_KERNEL);
+ psd = kzalloc_obj(*psd);
if (!psd)
return -ENOMEM;
@@ -222,7 +222,7 @@ int dev_pm_domain_attach_list(struct device *dev,
if (num_pds <= 0)
return 0;
- pds = kzalloc(sizeof(*pds), GFP_KERNEL);
+ pds = kzalloc_obj(*pds);
if (!pds)
return -ENOMEM;
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index ff393cba7649..9b69827cb0d0 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -198,11 +198,11 @@ static int dev_pm_qos_constraints_allocate(struct device *dev)
struct pm_qos_constraints *c;
struct blocking_notifier_head *n;
- qos = kzalloc(sizeof(*qos), GFP_KERNEL);
+ qos = kzalloc_obj(*qos);
if (!qos)
return -ENOMEM;
- n = kcalloc(3, sizeof(*n), GFP_KERNEL);
+ n = kzalloc_objs(*n, 3);
if (!n) {
kfree(qos);
return -ENOMEM;
@@ -704,7 +704,7 @@ int dev_pm_qos_expose_latency_limit(struct device *dev, s32 value)
if (!device_is_registered(dev) || value < 0)
return -EINVAL;
- req = kzalloc(sizeof(*req), GFP_KERNEL);
+ req = kzalloc_obj(*req);
if (!req)
return -ENOMEM;
@@ -780,7 +780,7 @@ int dev_pm_qos_expose_flags(struct device *dev, s32 val)
if (!device_is_registered(dev))
return -EINVAL;
- req = kzalloc(sizeof(*req), GFP_KERNEL);
+ req = kzalloc_obj(*req);
if (!req)
return -ENOMEM;
@@ -919,7 +919,7 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val)
ret = -EINVAL;
goto out;
}
- req = kzalloc(sizeof(*req), GFP_KERNEL);
+ req = kzalloc_obj(*req);
if (!req) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c
index aab843f6dfcc..ad23f0fa5d1a 100644
--- a/drivers/base/power/wakeirq.c
+++ b/drivers/base/power/wakeirq.c
@@ -55,7 +55,7 @@ int dev_pm_set_wake_irq(struct device *dev, int irq)
if (irq < 0)
return -EINVAL;
- wirq = kzalloc(sizeof(*wirq), GFP_KERNEL);
+ wirq = kzalloc_obj(*wirq);
if (!wirq)
return -ENOMEM;
@@ -179,7 +179,7 @@ static int __dev_pm_set_dedicated_wake_irq(struct device *dev, int irq, unsigned
if (irq < 0)
return -EINVAL;
- wirq = kzalloc(sizeof(*wirq), GFP_KERNEL);
+ wirq = kzalloc_obj(*wirq);
if (!wirq)
return -ENOMEM;
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index e69033d16fba..b8e48a023bf0 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -83,7 +83,7 @@ static struct wakeup_source *wakeup_source_create(const char *name)
const char *ws_name;
int id;
- ws = kzalloc(sizeof(*ws), GFP_KERNEL);
+ ws = kzalloc_obj(*ws);
if (!ws)
goto err_ws;
diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c
index 3ffd427248e8..308f8bde9aa3 100644
--- a/drivers/base/power/wakeup_stats.c
+++ b/drivers/base/power/wakeup_stats.c
@@ -141,7 +141,7 @@ static struct device *wakeup_source_device_create(struct device *parent,
struct device *dev = NULL;
int retval;
- dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev) {
retval = -ENOMEM;
goto error;