]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: media: av7110: use usleep_range in av7110_hw.c
authorPreyas Sharma <preyas17@zohomail.in>
Sat, 20 Dec 2025 09:55:19 +0000 (09:55 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 12:21:03 +0000 (13:21 +0100)
Use usleep_range instead of msleep to fix checkpatch warnings.

Signed-off-by: Preyas Sharma <preyas17@zohomail.in>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
[hverkuil: added commit message]

drivers/staging/media/av7110/av7110_hw.c

index bf8e6dca40e584d6fbcc7bb1c16dbb66df9f8127..49ce295771e412ca780a50b255d073030f029563 100644 (file)
@@ -312,7 +312,7 @@ int av7110_wait_msgstate(struct av7110 *av7110, u16 flags)
                        pr_err("%s(): timeout waiting for MSGSTATE %04x\n", __func__, stat & flags);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
        return 0;
 }
@@ -343,7 +343,7 @@ static int __av7110_send_fw_cmd(struct av7110 *av7110, u16 *buf, int length)
                        av7110->arm_errors++;
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 
        if (FW_VERSION(av7110->arm_app) <= 0x261f)
@@ -359,7 +359,7 @@ static int __av7110_send_fw_cmd(struct av7110 *av7110, u16 *buf, int length)
                        pr_err("%s(): timeout waiting for HANDSHAKE_REG\n", __func__);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 #endif
 
@@ -405,7 +405,7 @@ static int __av7110_send_fw_cmd(struct av7110 *av7110, u16 *buf, int length)
                                av7110->arm_errors++;
                                return -ETIMEDOUT;
                        }
-                       msleep(1);
+                       usleep_range(1000, 2000);
                }
        }
 
@@ -433,7 +433,7 @@ static int __av7110_send_fw_cmd(struct av7110 *av7110, u16 *buf, int length)
                               __func__, (buf[0] >> 8) & 0xff);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 
        stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2);
@@ -559,7 +559,7 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
                        return -ETIMEDOUT;
                }
 #ifdef _NOHANDSHAKE
-               msleep(1);
+               usleep_range(1000, 2000);
 #endif
        }
 
@@ -574,7 +574,7 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
                        mutex_unlock(&av7110->dcomlock);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 #endif
 
@@ -719,7 +719,7 @@ static int FlushText(struct av7110 *av7110)
                        mutex_unlock(&av7110->dcomlock);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
        mutex_unlock(&av7110->dcomlock);
        return 0;
@@ -745,7 +745,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf)
                        mutex_unlock(&av7110->dcomlock);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 #ifndef _NOHANDSHAKE
        start = jiffies;
@@ -758,7 +758,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf)
                        mutex_unlock(&av7110->dcomlock);
                        return -ETIMEDOUT;
                }
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 #endif
        for (i = 0; i < length / 2; i++)