From: Olof Johansson Date: Mon, 28 Oct 2019 15:20:05 +0000 (-0700) Subject: Merge tag 'reset-fixes-for-v5.5' of git://git.pengutronix.de/git/pza/linux into arm... X-Git-Tag: v5.4-rc7~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b25e29721de9fd48708b4b27a955dde582bb7d9f;hp=86ec2e1739aa1d6565888b4b2059fa47354e1a89;p=platform%2Fkernel%2Flinux-rpi.git Merge tag 'reset-fixes-for-v5.5' of git://git.pengutronix.de/git/pza/linux into arm/fixes Reset controller fixes for v5.5 This tag fixes a memory leak in reset_control_array_put(), which is called by reset_control_put() for reset array controls. The other patches are small kerneldoc comment fixes to avoid documentation build warnings. * tag 'reset-fixes-for-v5.5' of git://git.pengutronix.de/git/pza/linux: reset: fix reset_control_ops kerneldoc comment reset: fix reset_control_get_exclusive kerneldoc comment reset: fix reset_control_lookup kerneldoc comment reset: fix of_reset_control_get_count kerneldoc comment reset: fix of_reset_simple_xlate kerneldoc comment reset: Fix memory leak in reset_control_array_put() Link: https://lore.kernel.org/r/cbc2af1aece3762553219ba6b5222237dacaea9d.camel@pengutronix.de Signed-off-by: Olof Johansson --- diff --git a/drivers/reset/core.c b/drivers/reset/core.c index 213ff40..3c9a64c 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c @@ -76,7 +76,6 @@ static const char *rcdev_name(struct reset_controller_dev *rcdev) * of_reset_simple_xlate - translate reset_spec to the reset line number * @rcdev: a pointer to the reset controller device * @reset_spec: reset line specifier as found in the device tree - * @flags: a flags pointer to fill in (optional) * * This simple translation function should be used for reset controllers * with 1:1 mapping, where reset lines can be indexed by number without gaps. @@ -748,6 +747,7 @@ static void reset_control_array_put(struct reset_control_array *resets) for (i = 0; i < resets->num_rstcs; i++) __reset_control_put_internal(resets->rstc[i]); mutex_unlock(&reset_list_mutex); + kfree(resets); } /** @@ -825,9 +825,10 @@ int __device_reset(struct device *dev, bool optional) } EXPORT_SYMBOL_GPL(__device_reset); -/** +/* * APIs to manage an array of reset controls. */ + /** * of_reset_control_get_count - Count number of resets available with a device * diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h index 9326d67..eaae6b4 100644 --- a/include/linux/reset-controller.h +++ b/include/linux/reset-controller.h @@ -7,7 +7,7 @@ struct reset_controller_dev; /** - * struct reset_control_ops + * struct reset_control_ops - reset controller driver callbacks * * @reset: for self-deasserting resets, does all necessary * things to reset the device @@ -33,7 +33,7 @@ struct of_phandle_args; * @provider: name of the reset controller device controlling this reset line * @index: ID of the reset controller in the reset controller device * @dev_id: name of the device associated with this reset line - * @con_id name of the reset line (can be NULL) + * @con_id: name of the reset line (can be NULL) */ struct reset_control_lookup { struct list_head list; diff --git a/include/linux/reset.h b/include/linux/reset.h index e7793fc..eb597e8 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -143,7 +143,7 @@ static inline int device_reset_optional(struct device *dev) * If this function is called more than once for the same reset_control it will * return -EBUSY. * - * See reset_control_get_shared for details on shared references to + * See reset_control_get_shared() for details on shared references to * reset-controls. * * Use of id names is optional.