Re: [PATCH v5] staging: axis-fifo: initialize timeouts in probe only

From: Greg Kroah-Hartman
Date: Thu Mar 16 2023 - 09:04:43 EST


On Thu, Mar 16, 2023 at 05:56:02PM +0500, Khadija Kamran wrote:
> @@ -815,6 +811,16 @@ static int axis_fifo_probe(struct platform_device *pdev)
> char *device_name;
> int rc = 0; /* error return value */
>
> + if (read_timeout >= 0)
> + read_timeout = msecs_to_jiffies(read_timeout);
> + else
> + read_timeout = MAX_SCHEDULE_TIMEOUT;
> +
> + if (write_timeout >= 0)
> + write_timeout = msecs_to_jiffies(write_timeout);
> + else
> + write_timeout = MAX_SCHEDULE_TIMEOUT;

Also, this change needs to go into the axis_fifo_init() function, not
the driver probe as now the print message in there is not correct.

thanks,

greg k-h