Commit abcda807 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Kalle Valo

zd1211rw: Remove in_atomic() usage.

The usage of in_atomic() in driver code is deprecated as it can not
always detect all states where it is not allowed to sleep.

All callers are in premptible thread context and all functions invoke core
functions which have checks for invalid calling contexts already.
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Ulrich Kunitz <kune@deine-taler.de>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201101211536.2966644-7-bigeasy@linutronix.de
parent 7534fd5e
...@@ -1711,11 +1711,6 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values, ...@@ -1711,11 +1711,6 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
count, USB_MAX_IOREAD16_COUNT); count, USB_MAX_IOREAD16_COUNT);
return -EINVAL; return -EINVAL;
} }
if (in_atomic()) {
dev_dbg_f(zd_usb_dev(usb),
"error: io in atomic context not supported\n");
return -EWOULDBLOCK;
}
if (!usb_int_enabled(usb)) { if (!usb_int_enabled(usb)) {
dev_dbg_f(zd_usb_dev(usb), dev_dbg_f(zd_usb_dev(usb),
"error: usb interrupt not enabled\n"); "error: usb interrupt not enabled\n");
...@@ -1882,11 +1877,6 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, ...@@ -1882,11 +1877,6 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
count, USB_MAX_IOWRITE16_COUNT); count, USB_MAX_IOWRITE16_COUNT);
return -EINVAL; return -EINVAL;
} }
if (in_atomic()) {
dev_dbg_f(zd_usb_dev(usb),
"error: io in atomic context not supported\n");
return -EWOULDBLOCK;
}
udev = zd_usb_to_usbdev(usb); udev = zd_usb_to_usbdev(usb);
...@@ -1966,11 +1956,6 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits) ...@@ -1966,11 +1956,6 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
int i, req_len, actual_req_len; int i, req_len, actual_req_len;
u16 bit_value_template; u16 bit_value_template;
if (in_atomic()) {
dev_dbg_f(zd_usb_dev(usb),
"error: io in atomic context not supported\n");
return -EWOULDBLOCK;
}
if (bits < USB_MIN_RFWRITE_BIT_COUNT) { if (bits < USB_MIN_RFWRITE_BIT_COUNT) {
dev_dbg_f(zd_usb_dev(usb), dev_dbg_f(zd_usb_dev(usb),
"error: bits %d are smaller than" "error: bits %d are smaller than"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment