diff options
Diffstat (limited to 'drivers/gnss')
-rw-r--r-- | drivers/gnss/serial.c | 3 | ||||
-rw-r--r-- | drivers/gnss/sirf.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gnss/serial.c b/drivers/gnss/serial.c index b01ba4438501..31e891f00175 100644 --- a/drivers/gnss/serial.c +++ b/drivers/gnss/serial.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <linux/pm_runtime.h> | 15 | #include <linux/pm_runtime.h> |
16 | #include <linux/sched.h> | ||
16 | #include <linux/serdev.h> | 17 | #include <linux/serdev.h> |
17 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
18 | 19 | ||
@@ -63,7 +64,7 @@ static int gnss_serial_write_raw(struct gnss_device *gdev, | |||
63 | int ret; | 64 | int ret; |
64 | 65 | ||
65 | /* write is only buffered synchronously */ | 66 | /* write is only buffered synchronously */ |
66 | ret = serdev_device_write(serdev, buf, count, 0); | 67 | ret = serdev_device_write(serdev, buf, count, MAX_SCHEDULE_TIMEOUT); |
67 | if (ret < 0) | 68 | if (ret < 0) |
68 | return ret; | 69 | return ret; |
69 | 70 | ||
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c index 79cb98950013..71d014edd167 100644 --- a/drivers/gnss/sirf.c +++ b/drivers/gnss/sirf.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/pm_runtime.h> | 17 | #include <linux/pm_runtime.h> |
18 | #include <linux/regulator/consumer.h> | 18 | #include <linux/regulator/consumer.h> |
19 | #include <linux/sched.h> | ||
19 | #include <linux/serdev.h> | 20 | #include <linux/serdev.h> |
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
21 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
@@ -83,7 +84,7 @@ static int sirf_write_raw(struct gnss_device *gdev, const unsigned char *buf, | |||
83 | int ret; | 84 | int ret; |
84 | 85 | ||
85 | /* write is only buffered synchronously */ | 86 | /* write is only buffered synchronously */ |
86 | ret = serdev_device_write(serdev, buf, count, 0); | 87 | ret = serdev_device_write(serdev, buf, count, MAX_SCHEDULE_TIMEOUT); |
87 | if (ret < 0) | 88 | if (ret < 0) |
88 | return ret; | 89 | return ret; |
89 | 90 | ||