ax25_iface.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | ax25_iface.c (d8f969e603b85931f25a1d50f3a7a01e2712c17a) |
---|---|
1/* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License as published by 4 * the Free Software Foundation; either version 2 of the License, or 5 * (at your option) any later version. 6 * 7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 8 */ --- 44 unchanged lines hidden (view full) --- 53 protocol_list = ap; 54 write_unlock_bh(&protocol_list_lock); 55} 56 57EXPORT_SYMBOL_GPL(ax25_register_pid); 58 59void ax25_protocol_release(unsigned int pid) 60{ | 1/* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License as published by 4 * the Free Software Foundation; either version 2 of the License, or 5 * (at your option) any later version. 6 * 7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 8 */ --- 44 unchanged lines hidden (view full) --- 53 protocol_list = ap; 54 write_unlock_bh(&protocol_list_lock); 55} 56 57EXPORT_SYMBOL_GPL(ax25_register_pid); 58 59void ax25_protocol_release(unsigned int pid) 60{ |
61 struct ax25_protocol *s, *protocol; | 61 struct ax25_protocol *protocol; |
62 63 write_lock_bh(&protocol_list_lock); 64 protocol = protocol_list; 65 if (protocol == NULL) 66 goto out; 67 68 if (protocol->pid == pid) { 69 protocol_list = protocol->next; 70 goto out; 71 } 72 73 while (protocol != NULL && protocol->next != NULL) { 74 if (protocol->next->pid == pid) { | 62 63 write_lock_bh(&protocol_list_lock); 64 protocol = protocol_list; 65 if (protocol == NULL) 66 goto out; 67 68 if (protocol->pid == pid) { 69 protocol_list = protocol->next; 70 goto out; 71 } 72 73 while (protocol != NULL && protocol->next != NULL) { 74 if (protocol->next->pid == pid) { |
75 s = protocol->next; | |
76 protocol->next = protocol->next->next; 77 goto out; 78 } 79 80 protocol = protocol->next; 81 } 82out: 83 write_unlock_bh(&protocol_list_lock); --- 137 unchanged lines hidden --- | 75 protocol->next = protocol->next->next; 76 goto out; 77 } 78 79 protocol = protocol->next; 80 } 81out: 82 write_unlock_bh(&protocol_list_lock); --- 137 unchanged lines hidden --- |