Re: [PATCH v7 2/5] iio: pressure: bmp280: Introduce new cleanup routines

From: Jonathan Cameron
Date: Sun May 19 2024 - 10:25:13 EST


On Mon, 13 May 2024 01:05:21 +0200
Vasileios Amoiridis <vassilisamir@xxxxxxxxx> wrote:

> Introduce new linux/cleanup.h with the guard(mutex) functionality.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Suggested-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Signed-off-by: Vasileios Amoiridis <vassilisamir@xxxxxxxxx>

I put back the line accidentally deleted in this one whilst applying.

Jonathan


> +static int bmp580_nvmem_write(void *priv, unsigned int offset, void *val,
> + size_t bytes)
> +{
> + struct bmp280_data *data = priv;
> + int ret;
> +
> + pm_runtime_get_sync(data->dev);
> + ret = bmp580_nvmem_write_impl(priv, offset, val, bytes);
> pm_runtime_mark_last_busy(data->dev);
> pm_runtime_put_autosuspend(data->dev);
> +
> return ret;
> }
> -

grump.

> static int bmp580_preinit(struct bmp280_data *data)
> {
> struct nvmem_config config = {