diff options
| author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-07-05 02:20:48 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-04 13:02:56 -0400 |
| commit | c406563c02de0968dd1cd84eb1c4c0b25fbca447 (patch) | |
| tree | 503d99051441122c0103025f8b54bef8150c0103 /include/linux | |
| parent | a2302565befa08bcac8f74333594947688acd9f4 (diff) | |
platform: tegra_prod: Add devm_tegra_prod_get_from_node()
Add managed version of the prod API devm_tegra_prod_get_from_node() so
that client need not to explicitly clean the allocated resources.
Change-Id: I9dbc7f16228dd8179ef123e55a0ff8be3753d447
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1175452
Reviewed-on: https://git-master.nvidia.com/r/1768538
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/tegra_prod.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/tegra_prod.h b/include/linux/tegra_prod.h index c79519c50..37e84022b 100644 --- a/include/linux/tegra_prod.h +++ b/include/linux/tegra_prod.h | |||
| @@ -88,6 +88,24 @@ struct tegra_prod *devm_tegra_prod_get(struct device *dev); | |||
| 88 | struct tegra_prod *tegra_prod_get_from_node(struct device_node *np); | 88 | struct tegra_prod *tegra_prod_get_from_node(struct device_node *np); |
| 89 | 89 | ||
| 90 | /** | 90 | /** |
| 91 | * devm_tegra_prod_get_from_node(): Get the prod handle from the node. | ||
| 92 | * @dev: Device handle. | ||
| 93 | * @np: Node pointer on which prod setting nodes are available. | ||
| 94 | * | ||
| 95 | * Parse the prod-setting node of the node pointer "np" and keep all prod | ||
| 96 | * setting data in prod handle. | ||
| 97 | * This handle is used for setting prod configurations. | ||
| 98 | * | ||
| 99 | * Returns valid prod_list handle on success or pointer to the error | ||
| 100 | * when it failed. | ||
| 101 | * The allocated resource is released by driver core framework when device | ||
| 102 | * is unbinded and so no need to call any release APIs for the tegra_prod | ||
| 103 | * handle. | ||
| 104 | */ | ||
| 105 | struct tegra_prod *devm_tegra_prod_get_from_node(struct device *dev, | ||
| 106 | struct device_node *np); | ||
| 107 | |||
| 108 | /** | ||
| 91 | * tegra_prod_put(): Put the allocated prod handle. | 109 | * tegra_prod_put(): Put the allocated prod handle. |
| 92 | * @tegra_prod: Tegra prod handle which was allocated by function | 110 | * @tegra_prod: Tegra prod handle which was allocated by function |
| 93 | * devm_tegra_prod_get() or tegra_prod_get_from_node(). | 111 | * devm_tegra_prod_get() or tegra_prod_get_from_node(). |
