[PATCH v3 3/3] reset: Add support for shared reset controls

Philipp Zabel p.zabel at pengutronix.de
Fri Feb 5 01:08:24 PST 2016


Am Mittwoch, den 27.01.2016, 19:15 +0100 schrieb Hans de Goede:
[...]
> @@ -94,9 +99,16 @@ EXPORT_SYMBOL_GPL(reset_controller_unregister);
>  /**
>   * reset_control_reset - reset the controlled device
>   * @rstc: reset controller
> + *
> + * Calling this on a shared reset controller is an error.
>   */
>  int reset_control_reset(struct reset_control *rstc)
>  {
> +	if (rstc->shared) {
> +		WARN_ON(1);
> +		return -EINVAL;

Occurrences of
	if (condition) {
		WARN_ON(1);
		...
	}
could be changed to
	if (WARN_ON(condition)) {
		...
	}

regards
Philipp




More information about the linux-arm-kernel mailing list