Re: [PATCH v5 1/1] staging: iio: adc: ad7280a: use devm_* APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 04, 2018 at 11:49:00AM +0100, Slawomir Stepien wrote:
> devm_* APIs are device managed and make code simpler.
> 
> Signed-off-by: Slawomir Stepien <sst@xxxxxxxxx>
> ---

[]

> Since v4:
> * on devm_add_action fail, call the action on error handling

For such a use case, `devm_add_action_or_reset()` seems like a better
candidate.

> +	ret = devm_add_action(&spi->dev, ad7280_sw_power_down, st);
> +	if (ret) {
> +		ad7280_sw_power_down(st);
> +		return ret;
> +	}

Also, you can suppress the `1/1` in sunject [PATCH v5 1/1] by passing
`-N` flag to `git format-patch`.


-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux