PM / OPP: handle allocation of device_opp in a separate routine
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 10 Dec 2014 04:15:34 +0000 (09:45 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Dec 2014 21:18:34 +0000 (22:18 +0100)
commit07cce74a7b259cb90029530e9549bf1d9a1b1c34
tree856337b31922ce8d57bd341c2e6860e18ff27001
parent29df0ee1b14ab5cdc83c225258f42600825f45b2
PM / OPP: handle allocation of device_opp in a separate routine

Get the 'device_opp' allocation code into a separate routine to keep only the
necessary part in dev_pm_opp_add_dynamic().

Also do s/sizeof(struct device_opp)/sizeof(*dev_opp) and remove the print
message on kzalloc() failure as checkpatch warns for that.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c