netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: linux-can@vger.kernel.org, davem@davemloft.net
Cc: Oliver Hartkopp <socketcan@hartkopp.net>,
	mkl@pengutronix.de, dev@kicherer.org, netdev@vger.kernel.org
Subject: [PATCH 8/8] can: enable module auto loading for virtual CAN interfaces
Date: Tue, 25 Apr 2017 08:19:45 +0200	[thread overview]
Message-ID: <20170425061945.28722-9-socketcan@hartkopp.net> (raw)
In-Reply-To: <20170425061945.28722-1-socketcan@hartkopp.net>

Autoload the vcan module when a vcan instance is to be created by
'ip link add type vcan'

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
 drivers/net/can/vcan.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 674f367087c5..facca33d53e9 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -1,7 +1,7 @@
 /*
  * vcan.c - Virtual CAN interface
  *
- * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
+ * Copyright (c) 2002-2017 Volkswagen Group Electronic Research
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -50,9 +50,12 @@
 #include <linux/slab.h>
 #include <net/rtnetlink.h>
 
+#define DRV_NAME "vcan"
+
 MODULE_DESCRIPTION("virtual CAN interface");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
+MODULE_ALIAS_RTNL_LINK(DRV_NAME);
 
 
 /*
@@ -164,7 +167,7 @@ static void vcan_setup(struct net_device *dev)
 }
 
 static struct rtnl_link_ops vcan_link_ops __read_mostly = {
-	.kind	= "vcan",
+	.kind	= DRV_NAME,
 	.setup	= vcan_setup,
 };
 
-- 
2.11.0


  parent reply	other threads:[~2017-04-25  6:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  6:19 [PATCH 0/8] Fix and complete CAN namespace support Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 1/8] can: fix memory leak in initial " Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 2/8] can: remove obsolete pernet_operations definitions Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 3/8] can: remove obsolete definitions Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 4/8] can: complete initial namespace support Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 5/8] can: network namespace support for CAN_BCM protocol Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 6/8] can: network namespace support for CAN gateway Oliver Hartkopp
2017-04-25  6:19 ` [PATCH 7/8] can: add Virtual CAN Tunnel driver (vxcan) Oliver Hartkopp
2017-04-25  6:19 ` Oliver Hartkopp [this message]
2017-04-25  6:48 ` [PATCH 0/8] Fix and complete CAN namespace support Marc Kleine-Budde
2017-04-25  8:43   ` Oliver Hartkopp
2017-04-25  8:45   ` Marc Kleine-Budde
2017-04-25  8:48     ` Oliver Hartkopp
2017-04-25  8:49       ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170425061945.28722-9-socketcan@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=davem@davemloft.net \
    --cc=dev@kicherer.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).