projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[cascardo/linux.git]
/
drivers
/
nfc
/
port100.c
diff --git
a/drivers/nfc/port100.c
b/drivers/nfc/port100.c
index
481cb43
..
2b2330b
100644
(file)
--- a/
drivers/nfc/port100.c
+++ b/
drivers/nfc/port100.c
@@
-1050,6
+1050,10
@@
static int port100_switch_rf(struct nfc_digital_dev *ddev, bool on)
*skb_put(skb, 1) = on ? 1 : 0;
+ /* Cancel the last command if the device is being switched off */
+ if (!on)
+ port100_abort_cmd(ddev);
+
resp = port100_send_cmd_sync(dev, PORT100_CMD_SWITCH_RF, skb);
if (IS_ERR(resp))