aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-16 05:23:45 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 05:23:45 -0500
commitc4de673b775e4db48cd2db6277e0c6714332ca0c (patch)
tree84f9e4728e6ccf257236d2ba063b6e784ec8b65d /net/nfc
parentbafdc614a1f4f8be8cde41b8ab10ac17e67c1837 (diff)
parent55957fb7a0b61d8ab6ff3f04e279b8fc22b738fa (diff)
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/af_nfc.c4
-rw-r--r--net/nfc/core.c4
-rw-r--r--net/nfc/hci/command.c4
-rw-r--r--net/nfc/hci/core.c4
-rw-r--r--net/nfc/hci/hci.h4
-rw-r--r--net/nfc/hci/hcp.c4
-rw-r--r--net/nfc/hci/llc.c4
-rw-r--r--net/nfc/hci/llc.h4
-rw-r--r--net/nfc/hci/llc_nop.c4
-rw-r--r--net/nfc/hci/llc_shdlc.c4
-rw-r--r--net/nfc/llcp.h4
-rw-r--r--net/nfc/llcp_commands.c4
-rw-r--r--net/nfc/llcp_core.c4
-rw-r--r--net/nfc/llcp_sock.c6
-rw-r--r--net/nfc/nci/core.c3
-rw-r--r--net/nfc/nci/data.c3
-rw-r--r--net/nfc/nci/lib.c3
-rw-r--r--net/nfc/nci/ntf.c3
-rw-r--r--net/nfc/nci/rsp.c3
-rw-r--r--net/nfc/netlink.c45
-rw-r--r--net/nfc/nfc.h4
-rw-r--r--net/nfc/rawsock.c6
22 files changed, 42 insertions, 86 deletions
diff --git a/net/nfc/af_nfc.c b/net/nfc/af_nfc.c
index 9d68441e2a5a..2277276f52bc 100644
--- a/net/nfc/af_nfc.c
+++ b/net/nfc/af_nfc.c
@@ -16,9 +16,7 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the 19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 20 */
23 21
24#include <linux/nfc.h> 22#include <linux/nfc.h>
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 872529105abc..02ab34132157 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -16,9 +16,7 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the 19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 20 */
23 21
24#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ 22#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
diff --git a/net/nfc/hci/command.c b/net/nfc/hci/command.c
index 64f922be9281..a9f4d2e62d8d 100644
--- a/net/nfc/hci/command.c
+++ b/net/nfc/hci/command.c
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#define pr_fmt(fmt) "hci: %s: " fmt, __func__ 18#define pr_fmt(fmt) "hci: %s: " fmt, __func__
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index d07ca4c5cf8c..3b9610031baa 100644
--- a/net/nfc/hci/core.c
+++ b/net/nfc/hci/core.c
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#define pr_fmt(fmt) "hci: %s: " fmt, __func__ 18#define pr_fmt(fmt) "hci: %s: " fmt, __func__
diff --git a/net/nfc/hci/hci.h b/net/nfc/hci/hci.h
index b274d12c18ac..c3d2e2c1394c 100644
--- a/net/nfc/hci/hci.h
+++ b/net/nfc/hci/hci.h
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#ifndef __LOCAL_HCI_H 18#ifndef __LOCAL_HCI_H
diff --git a/net/nfc/hci/hcp.c b/net/nfc/hci/hcp.c
index b6b4109f2343..e9de1514656e 100644
--- a/net/nfc/hci/hcp.c
+++ b/net/nfc/hci/hcp.c
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#define pr_fmt(fmt) "hci: %s: " fmt, __func__ 18#define pr_fmt(fmt) "hci: %s: " fmt, __func__
diff --git a/net/nfc/hci/llc.c b/net/nfc/hci/llc.c
index fe5e966e5b88..a07d2b818487 100644
--- a/net/nfc/hci/llc.c
+++ b/net/nfc/hci/llc.c
@@ -13,9 +13,7 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the 16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */ 17 */
20 18
21#include <net/nfc/llc.h> 19#include <net/nfc/llc.h>
diff --git a/net/nfc/hci/llc.h b/net/nfc/hci/llc.h
index 7be0b7f3ceb6..5dad4c57ffb3 100644
--- a/net/nfc/hci/llc.h
+++ b/net/nfc/hci/llc.h
@@ -13,9 +13,7 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the 16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */ 17 */
20 18
21#ifndef __LOCAL_LLC_H_ 19#ifndef __LOCAL_LLC_H_
diff --git a/net/nfc/hci/llc_nop.c b/net/nfc/hci/llc_nop.c
index 87b10291b40f..d0435d5a197b 100644
--- a/net/nfc/hci/llc_nop.c
+++ b/net/nfc/hci/llc_nop.c
@@ -13,9 +13,7 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the 16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */ 17 */
20 18
21#include <linux/types.h> 19#include <linux/types.h>
diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c
index 27b313befc35..719ad0ac40de 100644
--- a/net/nfc/hci/llc_shdlc.c
+++ b/net/nfc/hci/llc_shdlc.c
@@ -13,9 +13,7 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the 16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */ 17 */
20 18
21#define pr_fmt(fmt) "shdlc: %s: " fmt, __func__ 19#define pr_fmt(fmt) "shdlc: %s: " fmt, __func__
diff --git a/net/nfc/llcp.h b/net/nfc/llcp.h
index f4d48b57ea11..de1789e3cc82 100644
--- a/net/nfc/llcp.h
+++ b/net/nfc/llcp.h
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20enum llcp_state { 18enum llcp_state {
diff --git a/net/nfc/llcp_commands.c b/net/nfc/llcp_commands.c
index 1017894807c0..693cd1aad582 100644
--- a/net/nfc/llcp_commands.c
+++ b/net/nfc/llcp_commands.c
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#define pr_fmt(fmt) "llcp: %s: " fmt, __func__ 18#define pr_fmt(fmt) "llcp: %s: " fmt, __func__
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
index 81cd3416c7d4..1349074e1ffc 100644
--- a/net/nfc/llcp_core.c
+++ b/net/nfc/llcp_core.c
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#define pr_fmt(fmt) "llcp: %s: " fmt, __func__ 18#define pr_fmt(fmt) "llcp: %s: " fmt, __func__
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index d308402b67d8..69fbc8dadba7 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nfc/llcp_sock.c
@@ -12,9 +12,7 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the 15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 16 */
19 17
20#define pr_fmt(fmt) "llcp: %s: " fmt, __func__ 18#define pr_fmt(fmt) "llcp: %s: " fmt, __func__
@@ -807,8 +805,6 @@ static int llcp_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
807 805
808 pr_debug("%p %zu\n", sk, len); 806 pr_debug("%p %zu\n", sk, len);
809 807
810 msg->msg_namelen = 0;
811
812 lock_sock(sk); 808 lock_sock(sk);
813 809
814 if (sk->sk_state == LLCP_CLOSED && 810 if (sk->sk_state == LLCP_CLOSED &&
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index b943d46a1644..f0e955e3a385 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -20,8 +20,7 @@
20 * GNU General Public License for more details. 20 * GNU General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * 24 *
26 */ 25 */
27 26
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 2a9399dd6c68..6c3aef852876 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -16,8 +16,7 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * 20 *
22 */ 21 */
23 22
diff --git a/net/nfc/nci/lib.c b/net/nfc/nci/lib.c
index 6b7fd26c68d9..ed774a2e989a 100644
--- a/net/nfc/nci/lib.c
+++ b/net/nfc/nci/lib.c
@@ -20,8 +20,7 @@
20 * GNU General Public License for more details. 20 * GNU General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * 24 *
26 */ 25 */
27 26
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index b2aa98ef0927..1e905097456b 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -20,8 +20,7 @@
20 * GNU General Public License for more details. 20 * GNU General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * 24 *
26 */ 25 */
27 26
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
index dd072f38ad00..041de51ccdbe 100644
--- a/net/nfc/nci/rsp.c
+++ b/net/nfc/nci/rsp.c
@@ -20,8 +20,7 @@
20 * GNU General Public License for more details. 20 * GNU General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * 24 *
26 */ 25 */
27 26
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 84b7e3ea7b7a..ebbf6fb88b35 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -16,9 +16,7 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the 19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 20 */
23 21
24#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ 22#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
@@ -30,8 +28,8 @@
30#include "nfc.h" 28#include "nfc.h"
31#include "llcp.h" 29#include "llcp.h"
32 30
33static struct genl_multicast_group nfc_genl_event_mcgrp = { 31static const struct genl_multicast_group nfc_genl_mcgrps[] = {
34 .name = NFC_GENL_MCAST_EVENT_NAME, 32 { .name = NFC_GENL_MCAST_EVENT_NAME, },
35}; 33};
36 34
37static struct genl_family nfc_genl_family = { 35static struct genl_family nfc_genl_family = {
@@ -194,7 +192,7 @@ int nfc_genl_targets_found(struct nfc_dev *dev)
194 192
195 genlmsg_end(msg, hdr); 193 genlmsg_end(msg, hdr);
196 194
197 return genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_ATOMIC); 195 return genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
198 196
199nla_put_failure: 197nla_put_failure:
200 genlmsg_cancel(msg, hdr); 198 genlmsg_cancel(msg, hdr);
@@ -223,7 +221,7 @@ int nfc_genl_target_lost(struct nfc_dev *dev, u32 target_idx)
223 221
224 genlmsg_end(msg, hdr); 222 genlmsg_end(msg, hdr);
225 223
226 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 224 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
227 225
228 return 0; 226 return 0;
229 227
@@ -255,7 +253,7 @@ int nfc_genl_tm_activated(struct nfc_dev *dev, u32 protocol)
255 253
256 genlmsg_end(msg, hdr); 254 genlmsg_end(msg, hdr);
257 255
258 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 256 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
259 257
260 return 0; 258 return 0;
261 259
@@ -285,7 +283,7 @@ int nfc_genl_tm_deactivated(struct nfc_dev *dev)
285 283
286 genlmsg_end(msg, hdr); 284 genlmsg_end(msg, hdr);
287 285
288 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 286 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
289 287
290 return 0; 288 return 0;
291 289
@@ -318,7 +316,7 @@ int nfc_genl_device_added(struct nfc_dev *dev)
318 316
319 genlmsg_end(msg, hdr); 317 genlmsg_end(msg, hdr);
320 318
321 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 319 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
322 320
323 return 0; 321 return 0;
324 322
@@ -348,7 +346,7 @@ int nfc_genl_device_removed(struct nfc_dev *dev)
348 346
349 genlmsg_end(msg, hdr); 347 genlmsg_end(msg, hdr);
350 348
351 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 349 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
352 350
353 return 0; 351 return 0;
354 352
@@ -414,7 +412,7 @@ int nfc_genl_llc_send_sdres(struct nfc_dev *dev, struct hlist_head *sdres_list)
414 412
415 genlmsg_end(msg, hdr); 413 genlmsg_end(msg, hdr);
416 414
417 return genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_ATOMIC); 415 return genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
418 416
419nla_put_failure: 417nla_put_failure:
420 genlmsg_cancel(msg, hdr); 418 genlmsg_cancel(msg, hdr);
@@ -448,7 +446,7 @@ int nfc_genl_se_added(struct nfc_dev *dev, u32 se_idx, u16 type)
448 446
449 genlmsg_end(msg, hdr); 447 genlmsg_end(msg, hdr);
450 448
451 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 449 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
452 450
453 return 0; 451 return 0;
454 452
@@ -479,7 +477,7 @@ int nfc_genl_se_removed(struct nfc_dev *dev, u32 se_idx)
479 477
480 genlmsg_end(msg, hdr); 478 genlmsg_end(msg, hdr);
481 479
482 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 480 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
483 481
484 return 0; 482 return 0;
485 483
@@ -600,7 +598,7 @@ int nfc_genl_dep_link_up_event(struct nfc_dev *dev, u32 target_idx,
600 598
601 dev->dep_link_up = true; 599 dev->dep_link_up = true;
602 600
603 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_ATOMIC); 601 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
604 602
605 return 0; 603 return 0;
606 604
@@ -632,7 +630,7 @@ int nfc_genl_dep_link_down_event(struct nfc_dev *dev)
632 630
633 genlmsg_end(msg, hdr); 631 genlmsg_end(msg, hdr);
634 632
635 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_ATOMIC); 633 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
636 634
637 return 0; 635 return 0;
638 636
@@ -1137,7 +1135,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name,
1137 1135
1138 genlmsg_end(msg, hdr); 1136 genlmsg_end(msg, hdr);
1139 1137
1140 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 1138 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
1141 1139
1142 return 0; 1140 return 0;
1143 1141
@@ -1308,7 +1306,7 @@ static void se_io_cb(void *context, u8 *apdu, size_t apdu_len, int err)
1308 1306
1309 genlmsg_end(msg, hdr); 1307 genlmsg_end(msg, hdr);
1310 1308
1311 genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL); 1309 genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
1312 1310
1313 kfree(ctx); 1311 kfree(ctx);
1314 1312
@@ -1364,7 +1362,7 @@ static int nfc_genl_se_io(struct sk_buff *skb, struct genl_info *info)
1364 return dev->ops->se_io(dev, se_idx, apdu, apdu_len, se_io_cb, ctx); 1362 return dev->ops->se_io(dev, se_idx, apdu, apdu_len, se_io_cb, ctx);
1365} 1363}
1366 1364
1367static struct genl_ops nfc_genl_ops[] = { 1365static const struct genl_ops nfc_genl_ops[] = {
1368 { 1366 {
1369 .cmd = NFC_CMD_GET_DEVICE, 1367 .cmd = NFC_CMD_GET_DEVICE,
1370 .doit = nfc_genl_get_device, 1368 .doit = nfc_genl_get_device,
@@ -1536,16 +1534,15 @@ int __init nfc_genl_init(void)
1536{ 1534{
1537 int rc; 1535 int rc;
1538 1536
1539 rc = genl_register_family_with_ops(&nfc_genl_family, nfc_genl_ops, 1537 rc = genl_register_family_with_ops_groups(&nfc_genl_family,
1540 ARRAY_SIZE(nfc_genl_ops)); 1538 nfc_genl_ops,
1539 nfc_genl_mcgrps);
1541 if (rc) 1540 if (rc)
1542 return rc; 1541 return rc;
1543 1542
1544 rc = genl_register_mc_group(&nfc_genl_family, &nfc_genl_event_mcgrp);
1545
1546 netlink_register_notifier(&nl_notifier); 1543 netlink_register_notifier(&nl_notifier);
1547 1544
1548 return rc; 1545 return 0;
1549} 1546}
1550 1547
1551/** 1548/**
diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h
index aaf606fc1faa..9d6e74f7e6b3 100644
--- a/net/nfc/nfc.h
+++ b/net/nfc/nfc.h
@@ -16,9 +16,7 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the 19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 20 */
23 21
24#ifndef __LOCAL_NFC_H 22#ifndef __LOCAL_NFC_H
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
index cd958b381f96..c27a6e86cae4 100644
--- a/net/nfc/rawsock.c
+++ b/net/nfc/rawsock.c
@@ -16,9 +16,7 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the 19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 20 */
23 21
24#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ 22#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
@@ -244,8 +242,6 @@ static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock,
244 if (!skb) 242 if (!skb)
245 return rc; 243 return rc;
246 244
247 msg->msg_namelen = 0;
248
249 copied = skb->len; 245 copied = skb->len;
250 if (len < copied) { 246 if (len < copied) {
251 msg->msg_flags |= MSG_TRUNC; 247 msg->msg_flags |= MSG_TRUNC;