projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c5a54f
)
NFC: Prevent polling when device is down
author
Samuel Ortiz
<sameo@linux.intel.com>
Wed, 10 Apr 2013 10:25:30 +0000
(12:25 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 11 Apr 2013 14:29:10 +0000
(16:29 +0200)
Some devices turn radio on whenever they're asked to start a poll.
To prevent that from happening, we just don't call into the driver
start_poll hook when the NFC device is down.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/core.c
patch
|
blob
|
blame
|
history
diff --git
a/net/nfc/core.c
b/net/nfc/core.c
index 6ceee8e181ca9e4f75b1745f22d8e818ebfb1cda..c571ca9a960cfe29b54d5bcac9d8fe524fb33cdd 100644
(file)
--- a/
net/nfc/core.c
+++ b/
net/nfc/core.c
@@
-143,6
+143,11
@@
int nfc_start_poll(struct nfc_dev *dev, u32 im_protocols, u32 tm_protocols)
goto error;
}
+ if (!dev->dev_up) {
+ rc = -ENODEV;
+ goto error;
+ }
+
if (dev->polling) {
rc = -EBUSY;
goto error;