| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /*****************************************************************************/ |
|---|
| 2 | 3 | |
|---|
| 3 | 4 | /* |
|---|
| .. | .. |
|---|
| 6 | 7 | * Copyright (C) 1998-2000 |
|---|
| 7 | 8 | * Thomas Sailer (sailer@ife.ee.ethz.ch) |
|---|
| 8 | 9 | * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | | - * |
|---|
| 19 | | - * You should have received a copy of the GNU General Public License |
|---|
| 20 | | - * along with this program; if not, write to the Free Software |
|---|
| 21 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 22 | | - * |
|---|
| 23 | 10 | * Please note that the GPL allows you to use the driver, NOT the radio. |
|---|
| 24 | 11 | * In order to use the radio, you need a license from the communications |
|---|
| 25 | 12 | * authority of your country. |
|---|
| 26 | | - * |
|---|
| 27 | 13 | * |
|---|
| 28 | 14 | * History: |
|---|
| 29 | 15 | * 0.1 xx.xx.1998 Initial version by Matthias Welwarsky (dg2fef) |
|---|
| .. | .. |
|---|
| 35 | 21 | * removed some pre-2.2 kernel compatibility cruft |
|---|
| 36 | 22 | * 0.6 10.08.1999 Check if parport can do SPP and is safe to access during interrupt contexts |
|---|
| 37 | 23 | * 0.7 12.02.2000 adapted to softnet driver interface |
|---|
| 38 | | - * |
|---|
| 39 | 24 | */ |
|---|
| 40 | 25 | |
|---|
| 41 | 26 | /*****************************************************************************/ |
|---|
| .. | .. |
|---|
| 515 | 500 | } |
|---|
| 516 | 501 | break; |
|---|
| 517 | 502 | } |
|---|
| 503 | + fallthrough; |
|---|
| 518 | 504 | |
|---|
| 519 | | - default: /* fall through */ |
|---|
| 505 | + default: |
|---|
| 520 | 506 | if (bc->hdlctx.calibrate <= 0) |
|---|
| 521 | 507 | return 0; |
|---|
| 522 | 508 | i = min_t(int, cnt, bc->hdlctx.calibrate); |
|---|
| .. | .. |
|---|
| 772 | 758 | * ===================== network driver interface ========================= |
|---|
| 773 | 759 | */ |
|---|
| 774 | 760 | |
|---|
| 775 | | -static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev) |
|---|
| 761 | +static netdev_tx_t baycom_send_packet(struct sk_buff *skb, struct net_device *dev) |
|---|
| 776 | 762 | { |
|---|
| 777 | 763 | struct baycom_state *bc = netdev_priv(dev); |
|---|
| 778 | 764 | |
|---|
| .. | .. |
|---|
| 975 | 961 | parport_write_control(pp, 0); /* reset the adapter */ |
|---|
| 976 | 962 | parport_release(bc->pdev); |
|---|
| 977 | 963 | parport_unregister_device(bc->pdev); |
|---|
| 978 | | - if (bc->skb) |
|---|
| 979 | | - dev_kfree_skb(bc->skb); |
|---|
| 964 | + dev_kfree_skb(bc->skb); |
|---|
| 980 | 965 | bc->skb = NULL; |
|---|
| 981 | 966 | printk(KERN_INFO "%s: close epp at iobase 0x%lx irq %u\n", |
|---|
| 982 | 967 | bc_drvname, dev->base_addr, dev->irq); |
|---|