mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
![Ulf Hansson](/assets/img/avatar_default.png)
The current error paths for the cpuidle-psci driver, may leak memory or possibly leave CPU devices attached to their PM domains. These are quite harmless issues, but still deserves to be taken care of. Although, rather than fixing them by keeping track of allocations that needs to be freed, which tends to become a bit messy, let's convert into a platform driver. In this way, it gets easier to fix the memory leaks as we can rely on the devm_* functions. Moreover, converting to a platform driver also enables support for deferred probe, which subsequent changes takes benefit from. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
20 lines
540 B
C
20 lines
540 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __CPUIDLE_PSCI_H
|
|
#define __CPUIDLE_PSCI_H
|
|
|
|
struct device;
|
|
struct device_node;
|
|
|
|
void psci_set_domain_state(u32 state);
|
|
int psci_dt_parse_state_node(struct device_node *np, u32 *state);
|
|
|
|
#ifdef CONFIG_ARM_PSCI_CPUIDLE_DOMAIN
|
|
struct device *psci_dt_attach_cpu(int cpu);
|
|
void psci_dt_detach_cpu(struct device *dev);
|
|
#else
|
|
static inline struct device *psci_dt_attach_cpu(int cpu) { return NULL; }
|
|
static inline void psci_dt_detach_cpu(struct device *dev) { }
|
|
#endif
|
|
|
|
#endif /* __CPUIDLE_PSCI_H */
|