/* elmcan.c - ELM327 based CAN interface driver
* (tty line discipline)
*
- * This file is derived from linux/drivers/net/can/slcan.c
+ * This driver started as a derivative of linux/drivers/net/can/slcan.c
+ * and my thanks go to the original authors for their inspiration.
*
* elmcan.c Author : Max Staudt <max-linux@enpas.org>
* slcan.c Author : Oliver Hartkopp <socketcan@hartkopp.net>
* slip.c Authors : Laurence Culhane <loz@holmes.demon.co.uk>
* Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>
*
+ * This code barely bears any resemblance to slcan anymore, and whatever
+ * may be left is Linux specific boilerplate anyway, however I am leaving
+ * the GPL-2.0 identifier at the top just to be sure.
+ *
+ * Please feel free to use my own code, especially the ELM327 communication
+ * logic, in accordance with SPDX-License-Identifier BSD-3-Clause to port
+ * this driver to other systems.
+ * - Max
+ *
*/
#define pr_fmt(fmt) "[elmcan] " fmt
unsigned int n, u32 *timestamp,
bool drop)
{
- WARN_ON(1); /* This function is a dummy, so don't call it! */
+ WARN_ON_ONCE(1); /* This function is a dummy, so don't call it! */
return ERR_PTR(-ENOBUFS);
}
/* We shouldn't get here after a hardware fault:
* can_bus_off() calls netif_carrier_off()
*/
- WARN_ON(elm->hw_failure);
+ WARN_ON_ONCE(elm->hw_failure);
if (!elm->tty ||
elm->hw_failure ||
{
int status;
- pr_info("ELM327 based best-effort CAN interface driver\n");
+ pr_info("ELM327 based best effort CAN interface driver\n");
pr_info("This device is severely limited as a CAN interface, see documentation.\n");
status = tty_register_ldisc(N_ELMCAN, &elmcan_ldisc);