linux/drivers/base
Stephen Boyd 772b05086d PM / clk: Do not __clk_get passed in clock-references
Clock references are on a per-user basis now, so they are not supposed
to be refcounted by itself anymore. Therefore multiple cascaded get and
put calls will fail.

When a clock reference gets passed into pm_clk_add_clk we can assume
that the pm clock handling will take control of the clock reference,
so after this functions returns the caller should've given up control
of that handle.

So remove the additional call to __clk_get() in __pm_clk_add().

The only current user of pm_clk_add_clk is drivers/clk/shmobile/clk-mstp.c
which already follows this paradigm by only getting the clock but not
puting it after passing the reference into pm_clk_add_clk.

In the error case the caller is expected to clean up the clock, as it
may very well try to do something different if pm_clk_add_clk() fails.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[add commit-message]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-10-06 09:46:24 +02:00
..
power PM / clk: Do not __clk_get passed in clock-references 2015-10-06 09:46:24 +02:00
regmap Merge remote-tracking branches 'regmap/topic/lockdep' and 'regmap/topic/seq-delay' into regmap-next 2015-09-04 17:22:10 +01:00
attribute_container.c attribute_container: fix missing blank lines after declarations 2015-03-25 14:35:09 +01:00
base.h driver core: correct device's shutdown order 2015-08-05 17:07:19 -07:00
bus.c driver-core: add asynchronous probing support for drivers 2015-05-20 00:25:24 -07:00
cacheinfo.c Merge 4.1-rc7 into driver-core-next 2015-06-08 10:19:40 -07:00
class.c drivers: base: class: Add a blank line after declarations 2015-03-25 14:36:19 +01:00
component.c component: fix bug with legacy API 2014-07-04 18:05:05 +01:00
container.c ACPI / hotplug / driver core: Handle containers in a special way 2013-12-29 15:25:48 +01:00
core.c Power management and ACPI material for v4.3-rc1 2015-09-01 19:45:46 -07:00
cpu.c cpu: Remove bogus __ref annotation of cpu_subsys_online() 2015-08-05 15:18:26 -07:00
dd.c Power management and ACPI material for v4.3-rc1 2015-09-01 19:45:46 -07:00
devcoredump.c devcoredump: provide a one-way disable function 2014-11-26 19:40:12 -08:00
devres.c devres: fix devres_get() 2015-08-05 15:11:48 -07:00
devtmpfs.c VFS: assorted weird filesystems: d_inode() annotations 2015-04-15 15:06:58 -04:00
dma-coherent.c drivers: dma-coherent: add initialization from device tree 2014-10-14 02:18:12 +02:00
dma-contiguous.c drivers: of: add return value to of_reserved_mem_device_init() 2014-10-29 16:33:14 -07:00
dma-mapping.c drivers: base: dma-mapping: Erase blank space after pointer 2015-03-25 14:36:19 +01:00
driver.c driver core: add missing blank line after declaration 2015-03-25 14:36:30 +01:00
firmware_class.c firmware: fix wrong memory deallocation in fw_add_devm_name() 2015-08-05 15:18:26 -07:00
firmware.c
hypervisor.c
init.c drivers: of/base: move of_init to driver_init 2015-05-26 19:55:56 -07:00
isa.c
Kconfig cma: make default CMA area size zero for x86 2014-12-10 17:41:06 -08:00
Makefile drivers/base: Add MSI domain support for non-PCI devices 2015-07-30 00:14:38 +02:00
map.c drivers: base: map: Use kmalloc_array instead of kmalloc 2015-03-25 14:35:08 +01:00
memory.c mm, hotplug: fix concurrent memory hot-add deadlock 2015-04-14 16:49:00 -07:00
module.c
node.c mm: check if section present during memory block registering 2015-09-04 16:54:41 -07:00
pinctrl.c drivers: pinctrl sleep and idle states in the core 2013-06-16 11:56:52 +02:00
platform-msi.c drivers/base: Add MSI domain support for non-PCI devices 2015-07-30 00:14:38 +02:00
platform.c drivercore: Fix unregistration path of platform devices 2015-08-25 11:29:57 -05:00
property.c device property: Don't overwrite addr when failing in device_get_mac_address 2015-09-08 13:40:23 -07:00
soc.c drivers/base: use tabs where possible in code indentation 2015-03-25 14:37:35 +01:00
syscore.c genirq: Simplify wakeup mechanism 2014-09-01 13:48:59 +02:00
topology.c sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
transport_class.c