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

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

 



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 = {





[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