On Tuesday 11 November 2008 22:20:07 Antti Seppälä wrote:
> +static void vlynq_reset(struct vlynq_device *dev)
> +{
> +     vlynq_reg_write(dev->local->control,
> +                     vlynq_reg_read(dev->local->control) |
> +                      VLYNQ_CTRL_RESET);
> +       
> +     /* Wait for the devices to finish resetting */
> +     set_current_state(TASK_INTERRUPTIBLE);
> +     schedule_timeout(msecs_to_jiffies(5));

If you do an interruptible sleep, you also have to check if you got interrupted.
Otherwise an interruptible sleep doesn't make much sense.
But I think you want msleep(5) here anyway.

> +
> +     /* Remove reset bit */
> +     vlynq_reg_write(dev->local->control,
> +                     vlynq_reg_read(dev->local->control) &
> +                     ~VLYNQ_CTRL_RESET);
> +
> +     /* Give some time for the devices to settle */
> +     set_current_state(TASK_INTERRUPTIBLE);
> +     schedule_timeout(msecs_to_jiffies(5));

Same here.

-- 
Greetings Michael.
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to