diff options
Diffstat (limited to 'net/nfc/core.c')
-rw-r--r-- | net/nfc/core.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c index ff749794bc5b..c9eacc1f145f 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c | |||
@@ -679,7 +679,7 @@ static void nfc_release(struct device *d) | |||
679 | 679 | ||
680 | if (dev->ops->check_presence) { | 680 | if (dev->ops->check_presence) { |
681 | del_timer_sync(&dev->check_pres_timer); | 681 | del_timer_sync(&dev->check_pres_timer); |
682 | destroy_workqueue(dev->check_pres_wq); | 682 | cancel_work_sync(&dev->check_pres_work); |
683 | } | 683 | } |
684 | 684 | ||
685 | nfc_genl_data_exit(&dev->genl_data); | 685 | nfc_genl_data_exit(&dev->genl_data); |
@@ -715,7 +715,7 @@ static void nfc_check_pres_timeout(unsigned long data) | |||
715 | { | 715 | { |
716 | struct nfc_dev *dev = (struct nfc_dev *)data; | 716 | struct nfc_dev *dev = (struct nfc_dev *)data; |
717 | 717 | ||
718 | queue_work(dev->check_pres_wq, &dev->check_pres_work); | 718 | queue_work(system_nrt_wq, &dev->check_pres_work); |
719 | } | 719 | } |
720 | 720 | ||
721 | struct class nfc_class = { | 721 | struct class nfc_class = { |
@@ -784,20 +784,11 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, | |||
784 | dev->targets_generation = 1; | 784 | dev->targets_generation = 1; |
785 | 785 | ||
786 | if (ops->check_presence) { | 786 | if (ops->check_presence) { |
787 | char name[32]; | ||
788 | init_timer(&dev->check_pres_timer); | 787 | init_timer(&dev->check_pres_timer); |
789 | dev->check_pres_timer.data = (unsigned long)dev; | 788 | dev->check_pres_timer.data = (unsigned long)dev; |
790 | dev->check_pres_timer.function = nfc_check_pres_timeout; | 789 | dev->check_pres_timer.function = nfc_check_pres_timeout; |
791 | 790 | ||
792 | INIT_WORK(&dev->check_pres_work, nfc_check_pres_work); | 791 | INIT_WORK(&dev->check_pres_work, nfc_check_pres_work); |
793 | snprintf(name, sizeof(name), "nfc%d_check_pres_wq", dev->idx); | ||
794 | dev->check_pres_wq = alloc_workqueue(name, WQ_NON_REENTRANT | | ||
795 | WQ_UNBOUND | | ||
796 | WQ_MEM_RECLAIM, 1); | ||
797 | if (dev->check_pres_wq == NULL) { | ||
798 | kfree(dev); | ||
799 | return NULL; | ||
800 | } | ||
801 | } | 792 | } |
802 | 793 | ||
803 | return dev; | 794 | return dev; |