mirror of https://gitee.com/openkylin/linux.git
rt2x00: initialize last_reset
Initialize last_reset variable to INITIAL_JIFFIES, otherwise it is not
possible to test H/W reset for first 5 minutes of system run.
Fixes: e403fa31ed
("rt2x00: add restart hw")
Reported-and-tested-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
54ecb8f702
commit
c91a9cfe9f
|
@ -555,7 +555,7 @@ static ssize_t rt2x00debug_write_restart_hw(struct file *file,
|
|||
{
|
||||
struct rt2x00debug_intf *intf = file->private_data;
|
||||
struct rt2x00_dev *rt2x00dev = intf->rt2x00dev;
|
||||
static unsigned long last_reset;
|
||||
static unsigned long last_reset = INITIAL_JIFFIES;
|
||||
|
||||
if (!rt2x00_has_cap_restart_hw(rt2x00dev))
|
||||
return -EOPNOTSUPP;
|
||||
|
|
Loading…
Reference in New Issue