diff options
Diffstat (limited to 'drivers/isdn/hardware')
36 files changed, 114 insertions, 52 deletions
diff --git a/drivers/isdn/hardware/avm/Makefile b/drivers/isdn/hardware/avm/Makefile index b540e8f2efb6..3830a0573fcc 100644 --- a/drivers/isdn/hardware/avm/Makefile +++ b/drivers/isdn/hardware/avm/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # Makefile for the AVM ISDN device drivers # Each configuration option enables a list of files. diff --git a/drivers/isdn/hardware/eicon/Makefile b/drivers/isdn/hardware/eicon/Makefile index 4fa7fdb7df0d..a0ab2e2d7df0 100644 --- a/drivers/isdn/hardware/eicon/Makefile +++ b/drivers/isdn/hardware/eicon/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # Makefile for the Eicon DIVA ISDN drivers. # Each configuration option enables a list of files. diff --git a/drivers/isdn/hardware/eicon/adapter.h b/drivers/isdn/hardware/eicon/adapter.h index 71a7c2f084a7..f9b24eb8781d 100644 --- a/drivers/isdn/hardware/eicon/adapter.h +++ b/drivers/isdn/hardware/eicon/adapter.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: adapter.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVA_USER_MODE_IDI_ADAPTER_H__ diff --git a/drivers/isdn/hardware/eicon/debug.c b/drivers/isdn/hardware/eicon/debug.c index 8bc2791bc39c..301788115c4f 100644 --- a/drivers/isdn/hardware/eicon/debug.c +++ b/drivers/isdn/hardware/eicon/debug.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include "platform.h" #include "pc.h" #include "di_defs.h" diff --git a/drivers/isdn/hardware/eicon/diva.c b/drivers/isdn/hardware/eicon/diva.c index d91dd580e978..944a7f338099 100644 --- a/drivers/isdn/hardware/eicon/diva.c +++ b/drivers/isdn/hardware/eicon/diva.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* $Id: diva.c,v 1.21.4.1 2004/05/08 14:33:43 armin Exp $ */ #define CARDTYPE_H_WANT_DATA 1 diff --git a/drivers/isdn/hardware/eicon/diva.h b/drivers/isdn/hardware/eicon/diva.h index e979085d1b89..b067032093a8 100644 --- a/drivers/isdn/hardware/eicon/diva.h +++ b/drivers/isdn/hardware/eicon/diva.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: diva.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */ #ifndef __DIVA_XDI_OS_PART_H__ diff --git a/drivers/isdn/hardware/eicon/diva_pci.h b/drivers/isdn/hardware/eicon/diva_pci.h index bb4b562050f6..7ef5db98ad3c 100644 --- a/drivers/isdn/hardware/eicon/diva_pci.h +++ b/drivers/isdn/hardware/eicon/diva_pci.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: diva_pci.h,v 1.6 2003/01/04 15:29:45 schindler Exp $ */ #ifndef __DIVA_PCI_INTERFACE_H__ diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c index c61049585cbd..0033d74a7291 100644 --- a/drivers/isdn/hardware/eicon/divasi.c +++ b/drivers/isdn/hardware/eicon/divasi.c @@ -78,7 +78,7 @@ static unsigned int um_idi_poll(struct file *file, poll_table *wait); static int um_idi_open(struct inode *inode, struct file *file); static int um_idi_release(struct inode *inode, struct file *file); static int remove_entity(void *entity); -static void diva_um_timer_function(unsigned long data); +static void diva_um_timer_function(struct timer_list *t); /* * proc entry @@ -300,8 +300,7 @@ static int um_idi_open_adapter(struct file *file, int adapter_nr) p_os = (diva_um_idi_os_context_t *) diva_um_id_get_os_context(e); init_waitqueue_head(&p_os->read_wait); init_waitqueue_head(&p_os->close_wait); - setup_timer(&p_os->diva_timer_id, (void *)diva_um_timer_function, - (unsigned long)p_os); + timer_setup(&p_os->diva_timer_id, diva_um_timer_function, 0); p_os->aborted = 0; p_os->adapter_nr = adapter_nr; return (1); @@ -457,9 +456,9 @@ void diva_os_wakeup_close(void *os_context) } static -void diva_um_timer_function(unsigned long data) +void diva_um_timer_function(struct timer_list *t) { - diva_um_idi_os_context_t *p_os = (diva_um_idi_os_context_t *) data; + diva_um_idi_os_context_t *p_os = from_timer(p_os, t, diva_timer_id); p_os->aborted = 1; wake_up_interruptible(&p_os->read_wait); diff --git a/drivers/isdn/hardware/eicon/dqueue.h b/drivers/isdn/hardware/eicon/dqueue.h index 6992c45457a4..2da9799686ab 100644 --- a/drivers/isdn/hardware/eicon/dqueue.h +++ b/drivers/isdn/hardware/eicon/dqueue.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: dqueue.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */ #ifndef _DIVA_USER_MODE_IDI_DATA_QUEUE_H__ diff --git a/drivers/isdn/hardware/eicon/dsp_tst.h b/drivers/isdn/hardware/eicon/dsp_tst.h index fe36f138be8b..85edd3ea50f7 100644 --- a/drivers/isdn/hardware/eicon/dsp_tst.h +++ b/drivers/isdn/hardware/eicon/dsp_tst.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: dsp_tst.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */ #ifndef __DIVA_PRI_HOST_TEST_DSPS_H__ diff --git a/drivers/isdn/hardware/eicon/entity.h b/drivers/isdn/hardware/eicon/entity.h index fdb83416af31..f9767d321db9 100644 --- a/drivers/isdn/hardware/eicon/entity.h +++ b/drivers/isdn/hardware/eicon/entity.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: entity.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVAS_USER_MODE_IDI_ENTITY__ diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c index eadd1ed1e014..def7992a38e6 100644 --- a/drivers/isdn/hardware/eicon/message.c +++ b/drivers/isdn/hardware/eicon/message.c @@ -4501,6 +4501,7 @@ static void control_rc(PLCI *plci, byte req, byte rc, byte ch, byte global_req, plci->channels++; a->ncci_state[ncci] = OUTG_CON_PENDING; } + /* fall through */ default: if (plci->internal_command_queue[0]) @@ -7020,6 +7021,7 @@ static void nl_ind(PLCI *plci) plci->NL.RNum = 1; return; } + /* fall through */ case N_BDATA: case N_DATA: if (((a->ncci_state[ncci] != CONNECTED) && (plci->B2_prot == 1)) /* transparent */ @@ -9626,9 +9628,9 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) { case DTMF_LISTEN_TONE_START: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_LISTEN_MF_START: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_LISTEN_START: switch (internal_command) @@ -9636,6 +9638,7 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) default: adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities | B1_FACILITY_DTMFR), DTMF_COMMAND_1); + /* fall through */ case DTMF_COMMAND_1: if (adjust_b_process(Id, plci, Rc) != GOOD) { @@ -9646,6 +9649,7 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) } if (plci->internal_command) return; + /* fall through */ case DTMF_COMMAND_2: if (plci_nl_busy(plci)) { @@ -9673,9 +9677,9 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) case DTMF_LISTEN_TONE_STOP: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_LISTEN_MF_STOP: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_LISTEN_STOP: switch (internal_command) @@ -9710,6 +9714,7 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) */ adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities & ~(B1_FACILITY_DTMFX | B1_FACILITY_DTMFR)), DTMF_COMMAND_3); + /* fall through */ case DTMF_COMMAND_3: if (adjust_b_process(Id, plci, Rc) != GOOD) { @@ -9726,9 +9731,9 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) case DTMF_SEND_TONE: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_SEND_MF: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_DIGITS_SEND: switch (internal_command) @@ -9737,6 +9742,7 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities | ((plci->dtmf_parameter_length != 0) ? B1_FACILITY_DTMFX | B1_FACILITY_DTMFR : B1_FACILITY_DTMFX)), DTMF_COMMAND_1); + /* fall through */ case DTMF_COMMAND_1: if (adjust_b_process(Id, plci, Rc) != GOOD) { @@ -9747,6 +9753,7 @@ static void dtmf_command(dword Id, PLCI *plci, byte Rc) } if (plci->internal_command) return; + /* fall through */ case DTMF_COMMAND_2: if (plci_nl_busy(plci)) { @@ -9863,7 +9870,7 @@ static byte dtmf_request(dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci case DTMF_LISTEN_TONE_START: case DTMF_LISTEN_TONE_STOP: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_LISTEN_MF_START: case DTMF_LISTEN_MF_STOP: mask <<= 1; @@ -9875,6 +9882,7 @@ static byte dtmf_request(dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci PUT_WORD(&result[1], DTMF_UNKNOWN_REQUEST); break; } + /* fall through */ case DTMF_LISTEN_START: case DTMF_LISTEN_STOP: @@ -9904,7 +9912,7 @@ static byte dtmf_request(dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci case DTMF_SEND_TONE: - mask <<= 1; + mask <<= 1; /* fall through */ case DTMF_SEND_MF: mask <<= 1; if (!((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[appl->Id - 1]) @@ -9915,6 +9923,7 @@ static byte dtmf_request(dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci PUT_WORD(&result[1], DTMF_UNKNOWN_REQUEST); break; } + /* fall through */ case DTMF_DIGITS_SEND: if (api_parse(&msg[1].info[1], msg[1].length, "wwws", dtmf_parms)) @@ -11315,6 +11324,7 @@ static word mixer_restore_config(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_RESTORE_MIXER_5; Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_MIXER_2: case ADJUST_B_RESTORE_MIXER_3: case ADJUST_B_RESTORE_MIXER_4: @@ -11344,10 +11354,12 @@ static word mixer_restore_config(dword Id, PLCI *plci, byte Rc) plci->internal_command = plci->adjust_b_command; break; } + /* fall through */ case ADJUST_B_RESTORE_MIXER_5: xconnect_write_coefs(plci, plci->adjust_b_command); plci->adjust_b_state = ADJUST_B_RESTORE_MIXER_6; Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_MIXER_6: if (!xconnect_write_coefs_process(Id, plci, Rc)) { @@ -11392,6 +11404,7 @@ static void mixer_command(dword Id, PLCI *plci, byte Rc) adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities | B1_FACILITY_MIXER), MIXER_COMMAND_1); } + /* fall through */ case MIXER_COMMAND_1: if (plci->li_channel_bits & LI_CHANNEL_INVOLVED) { @@ -11419,6 +11432,7 @@ static void mixer_command(dword Id, PLCI *plci, byte Rc) mixer_indication_coefs_set(Id, plci); } while (plci->li_plci_b_read_pos != plci->li_plci_b_req_pos); } + /* fall through */ case MIXER_COMMAND_2: if ((plci->li_channel_bits & LI_CHANNEL_INVOLVED) || ((get_b1_facilities(plci, plci->B1_resource) & B1_FACILITY_MIXER) @@ -11450,6 +11464,7 @@ static void mixer_command(dword Id, PLCI *plci, byte Rc) adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities & ~B1_FACILITY_MIXER), MIXER_COMMAND_3); } + /* fall through */ case MIXER_COMMAND_3: if (!(plci->li_channel_bits & LI_CHANNEL_INVOLVED)) { @@ -12602,6 +12617,7 @@ static void ec_command(dword Id, PLCI *plci, byte Rc) default: adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities | B1_FACILITY_EC), EC_COMMAND_1); + /* fall through */ case EC_COMMAND_1: if (adjust_b_process(Id, plci, Rc) != GOOD) { @@ -12612,6 +12628,7 @@ static void ec_command(dword Id, PLCI *plci, byte Rc) } if (plci->internal_command) return; + /* fall through */ case EC_COMMAND_2: if (plci->sig_req) { @@ -12650,6 +12667,7 @@ static void ec_command(dword Id, PLCI *plci, byte Rc) return; } Rc = OK; + /* fall through */ case EC_COMMAND_2: if ((Rc != OK) && (Rc != OK_FC)) { @@ -12660,6 +12678,7 @@ static void ec_command(dword Id, PLCI *plci, byte Rc) } adjust_b1_resource(Id, plci, NULL, (word)(plci->B1_facilities & ~B1_FACILITY_EC), EC_COMMAND_3); + /* fall through */ case EC_COMMAND_3: if (adjust_b_process(Id, plci, Rc) != GOOD) { @@ -13485,6 +13504,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_SAVE_MIXER_1; Rc = OK; + /* fall through */ case ADJUST_B_SAVE_MIXER_1: if (plci->adjust_b_mode & ADJUST_B_MODE_SAVE) { @@ -13496,6 +13516,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_SAVE_DTMF_1; Rc = OK; + /* fall through */ case ADJUST_B_SAVE_DTMF_1: if (plci->adjust_b_mode & ADJUST_B_MODE_SAVE) { @@ -13506,6 +13527,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_REMOVE_L23_1; + /* fall through */ case ADJUST_B_REMOVE_L23_1: if ((plci->adjust_b_mode & ADJUST_B_MODE_REMOVE_L23) && plci->NL.Id && !plci->nl_remove_id) @@ -13530,6 +13552,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_REMOVE_L23_2; Rc = OK; + /* fall through */ case ADJUST_B_REMOVE_L23_2: if ((Rc != OK) && (Rc != OK_FC)) { @@ -13548,6 +13571,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_SAVE_EC_1; Rc = OK; + /* fall through */ case ADJUST_B_SAVE_EC_1: if (plci->adjust_b_mode & ADJUST_B_MODE_SAVE) { @@ -13559,6 +13583,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_SAVE_DTMF_PARAMETER_1; Rc = OK; + /* fall through */ case ADJUST_B_SAVE_DTMF_PARAMETER_1: if (plci->adjust_b_mode & ADJUST_B_MODE_SAVE) { @@ -13570,6 +13595,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_SAVE_VOICE_1; Rc = OK; + /* fall through */ case ADJUST_B_SAVE_VOICE_1: if (plci->adjust_b_mode & ADJUST_B_MODE_SAVE) { @@ -13578,6 +13604,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) break; } plci->adjust_b_state = ADJUST_B_SWITCH_L1_1; + /* fall through */ case ADJUST_B_SWITCH_L1_1: if (plci->adjust_b_mode & ADJUST_B_MODE_SWITCH_L1) { @@ -13608,6 +13635,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_SWITCH_L1_2; Rc = OK; + /* fall through */ case ADJUST_B_SWITCH_L1_2: if ((Rc != OK) && (Rc != OK_FC)) { @@ -13619,6 +13647,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_RESTORE_VOICE_1; Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_VOICE_1: case ADJUST_B_RESTORE_VOICE_2: if (plci->adjust_b_mode & ADJUST_B_MODE_RESTORE) @@ -13629,6 +13658,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_RESTORE_DTMF_PARAMETER_1; Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_DTMF_PARAMETER_1: case ADJUST_B_RESTORE_DTMF_PARAMETER_2: if (plci->adjust_b_mode & ADJUST_B_MODE_RESTORE) @@ -13641,6 +13671,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_RESTORE_EC_1; Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_EC_1: case ADJUST_B_RESTORE_EC_2: if (plci->adjust_b_mode & ADJUST_B_MODE_RESTORE) @@ -13652,6 +13683,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_ASSIGN_L23_1; + /* fall through */ case ADJUST_B_ASSIGN_L23_1: if (plci->adjust_b_mode & ADJUST_B_MODE_ASSIGN_L23) { @@ -13681,6 +13713,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_ASSIGN_L23_2; Rc = ASSIGN_OK; + /* fall through */ case ADJUST_B_ASSIGN_L23_2: if ((Rc != OK) && (Rc != OK_FC) && (Rc != ASSIGN_OK)) { @@ -13703,6 +13736,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) break; } plci->adjust_b_state = ADJUST_B_CONNECT_1; + /* fall through */ case ADJUST_B_CONNECT_1: if (plci->adjust_b_mode & ADJUST_B_MODE_CONNECT) { @@ -13716,6 +13750,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_RESTORE_DTMF_1; Rc = OK; + /* fall through */ case ADJUST_B_CONNECT_2: case ADJUST_B_CONNECT_3: case ADJUST_B_CONNECT_4: @@ -13751,6 +13786,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) break; } Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_DTMF_1: case ADJUST_B_RESTORE_DTMF_2: if (plci->adjust_b_mode & ADJUST_B_MODE_RESTORE) @@ -13763,6 +13799,7 @@ static word adjust_b_process(dword Id, PLCI *plci, byte Rc) } plci->adjust_b_state = ADJUST_B_RESTORE_MIXER_1; Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_MIXER_1: case ADJUST_B_RESTORE_MIXER_2: case ADJUST_B_RESTORE_MIXER_3: @@ -13827,6 +13864,7 @@ static void adjust_b_restore(dword Id, PLCI *plci, byte Rc) break; } Rc = OK; + /* fall through */ case ADJUST_B_RESTORE_1: if ((Rc != OK) && (Rc != OK_FC)) { @@ -13841,6 +13879,7 @@ static void adjust_b_restore(dword Id, PLCI *plci, byte Rc) plci->adjust_b_state = ADJUST_B_START; dbug(1, dprintf("[%06lx] %s,%d: Adjust B restore...", UnMapId(Id), (char *)(FILE_), __LINE__)); + /* fall through */ case ADJUST_B_RESTORE_2: if (adjust_b_process(Id, plci, Rc) != GOOD) { @@ -13877,6 +13916,7 @@ static void reset_b3_command(dword Id, PLCI *plci, byte Rc) plci->adjust_b_state = ADJUST_B_START; dbug(1, dprintf("[%06lx] %s,%d: Reset B3...", UnMapId(Id), (char *)(FILE_), __LINE__)); + /* fall through */ case RESET_B3_COMMAND_1: Info = adjust_b_process(Id, plci, Rc); if (Info != GOOD) @@ -13930,6 +13970,7 @@ static void select_b_command(dword Id, PLCI *plci, byte Rc) plci->adjust_b_state = ADJUST_B_START; dbug(1, dprintf("[%06lx] %s,%d: Select B protocol...", UnMapId(Id), (char *)(FILE_), __LINE__)); + /* fall through */ case SELECT_B_COMMAND_1: Info = adjust_b_process(Id, plci, Rc); if (Info != GOOD) @@ -13965,7 +14006,7 @@ static void fax_connect_ack_command(dword Id, PLCI *plci, byte Rc) switch (internal_command) { default: - plci->command = 0; + plci->command = 0; /* fall through */ case FAX_CONNECT_ACK_COMMAND_1: if (plci_nl_busy(plci)) { @@ -14013,6 +14054,7 @@ static void fax_edata_ack_command(dword Id, PLCI *plci, byte Rc) { default: plci->command = 0; + /* fall through */ case FAX_EDATA_ACK_COMMAND_1: if (plci_nl_busy(plci)) { @@ -14052,7 +14094,7 @@ static void fax_connect_info_command(dword Id, PLCI *plci, byte Rc) switch (internal_command) { default: - plci->command = 0; + plci->command = 0; /* fall through */ case FAX_CONNECT_INFO_COMMAND_1: if (plci_nl_busy(plci)) { @@ -14112,6 +14154,7 @@ static void fax_adjust_b23_command(dword Id, PLCI *plci, byte Rc) plci->adjust_b_state = ADJUST_B_START; dbug(1, dprintf("[%06lx] %s,%d: FAX adjust B23...", UnMapId(Id), (char *)(FILE_), __LINE__)); + /* fall through */ case FAX_ADJUST_B23_COMMAND_1: Info = adjust_b_process(Id, plci, Rc); if (Info != GOOD) @@ -14122,6 +14165,7 @@ static void fax_adjust_b23_command(dword Id, PLCI *plci, byte Rc) } if (plci->internal_command) return; + /* fall through */ case FAX_ADJUST_B23_COMMAND_2: if (plci_nl_busy(plci)) { @@ -14194,7 +14238,7 @@ static void rtp_connect_b3_req_command(dword Id, PLCI *plci, byte Rc) switch (internal_command) { default: - plci->command = 0; + plci->command = 0; /* fall through */ case RTP_CONNECT_B3_REQ_COMMAND_1: if (plci_nl_busy(plci)) { @@ -14245,7 +14289,7 @@ static void rtp_connect_b3_res_command(dword Id, PLCI *plci, byte Rc) switch (internal_command) { default: - plci->command = 0; + plci->command = 0; /* fall through */ case RTP_CONNECT_B3_RES_COMMAND_1: if (plci_nl_busy(plci)) { @@ -14310,6 +14354,7 @@ static void hold_save_command(dword Id, PLCI *plci, byte Rc) plci->adjust_b_state = ADJUST_B_START; dbug(1, dprintf("[%06lx] %s,%d: HOLD save...", UnMapId(Id), (char *)(FILE_), __LINE__)); + /* fall through */ case HOLD_SAVE_COMMAND_1: Info = adjust_b_process(Id, plci, Rc); if (Info != GOOD) @@ -14349,6 +14394,7 @@ static void retrieve_restore_command(dword Id, PLCI *plci, byte Rc) plci->adjust_b_state = ADJUST_B_START; dbug(1, dprintf("[%06lx] %s,%d: RETRIEVE restore...", UnMapId(Id), (char *)(FILE_), __LINE__)); + /* fall through */ case RETRIEVE_RESTORE_COMMAND_1: Info = adjust_b_process(Id, plci, Rc); if (Info != GOOD) diff --git a/drivers/isdn/hardware/eicon/os_4bri.c b/drivers/isdn/hardware/eicon/os_4bri.c index 1891246807ed..87db5f4df27d 100644 --- a/drivers/isdn/hardware/eicon/os_4bri.c +++ b/drivers/isdn/hardware/eicon/os_4bri.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* $Id: os_4bri.c,v 1.28.4.4 2005/02/11 19:40:25 armin Exp $ */ #include "platform.h" diff --git a/drivers/isdn/hardware/eicon/os_4bri.h b/drivers/isdn/hardware/eicon/os_4bri.h index 72253278d4f5..94b2709537d8 100644 --- a/drivers/isdn/hardware/eicon/os_4bri.h +++ b/drivers/isdn/hardware/eicon/os_4bri.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: os_4bri.h,v 1.1.2.2 2001/02/08 12:25:44 armin Exp $ */ #ifndef __DIVA_OS_4_BRI_H__ diff --git a/drivers/isdn/hardware/eicon/os_bri.c b/drivers/isdn/hardware/eicon/os_bri.c index 20f2653c58fa..de93090bcacb 100644 --- a/drivers/isdn/hardware/eicon/os_bri.c +++ b/drivers/isdn/hardware/eicon/os_bri.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* $Id: os_bri.c,v 1.21 2004/03/21 17:26:01 armin Exp $ */ #include "platform.h" diff --git a/drivers/isdn/hardware/eicon/os_bri.h b/drivers/isdn/hardware/eicon/os_bri.h index 02e7456f8962..37c92cc53ded 100644 --- a/drivers/isdn/hardware/eicon/os_bri.h +++ b/drivers/isdn/hardware/eicon/os_bri.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: os_bri.h,v 1.1.2.2 2001/02/08 12:25:44 armin Exp $ */ #ifndef __DIVA_OS_BRI_REV_1_H__ diff --git a/drivers/isdn/hardware/eicon/os_pri.c b/drivers/isdn/hardware/eicon/os_pri.c index da4957abb422..b20f1fb89d14 100644 --- a/drivers/isdn/hardware/eicon/os_pri.c +++ b/drivers/isdn/hardware/eicon/os_pri.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* $Id: os_pri.c,v 1.32 2004/03/21 17:26:01 armin Exp $ */ #include "platform.h" diff --git a/drivers/isdn/hardware/eicon/os_pri.h b/drivers/isdn/hardware/eicon/os_pri.h index 537c74d042e7..0e91855b171a 100644 --- a/drivers/isdn/hardware/eicon/os_pri.h +++ b/drivers/isdn/hardware/eicon/os_pri.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: os_pri.h,v 1.1.2.2 2001/02/08 12:25:44 armin Exp $ */ #ifndef __DIVA_OS_PRI_REV_1_H__ diff --git a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c index e1519718ce67..db4dd4ff3642 100644 --- a/drivers/isdn/hardware/eicon/um_idi.c +++ b/drivers/isdn/hardware/eicon/um_idi.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* $Id: um_idi.c,v 1.14 2004/03/21 17:54:37 armin Exp $ */ #include "platform.h" diff --git a/drivers/isdn/hardware/eicon/um_idi.h b/drivers/isdn/hardware/eicon/um_idi.h index ffb88f7b42fc..9aedd9e351a3 100644 --- a/drivers/isdn/hardware/eicon/um_idi.h +++ b/drivers/isdn/hardware/eicon/um_idi.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: um_idi.h,v 1.6 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVA_USER_MODE_IDI_CORE_H__ diff --git a/drivers/isdn/hardware/eicon/um_xdi.h b/drivers/isdn/hardware/eicon/um_xdi.h index b48fc042a5bc..1f37aa4efd18 100644 --- a/drivers/isdn/hardware/eicon/um_xdi.h +++ b/drivers/isdn/hardware/eicon/um_xdi.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: um_xdi.h,v 1.1.2.2 2002/10/02 14:38:38 armin Exp $ */ #ifndef __DIVA_USER_MODE_XDI_H__ diff --git a/drivers/isdn/hardware/eicon/xdi_adapter.h b/drivers/isdn/hardware/eicon/xdi_adapter.h index d303e65dbe6c..b036e217c659 100644 --- a/drivers/isdn/hardware/eicon/xdi_adapter.h +++ b/drivers/isdn/hardware/eicon/xdi_adapter.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: xdi_adapter.h,v 1.7 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVA_OS_XDI_ADAPTER_H__ diff --git a/drivers/isdn/hardware/eicon/xdi_msg.h b/drivers/isdn/hardware/eicon/xdi_msg.h index 2498c349a32e..0646079bf466 100644 --- a/drivers/isdn/hardware/eicon/xdi_msg.h +++ b/drivers/isdn/hardware/eicon/xdi_msg.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* $Id: xdi_msg.h,v 1.1.2.2 2001/02/16 08:40:36 armin Exp $ */ #ifndef __DIVA_XDI_UM_CFG_MESSAGE_H__ diff --git a/drivers/isdn/hardware/mISDN/Makefile b/drivers/isdn/hardware/mISDN/Makefile index 2987d990993f..422f9fd8ab9a 100644 --- a/drivers/isdn/hardware/mISDN/Makefile +++ b/drivers/isdn/hardware/mISDN/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the modular ISDN hardware drivers # diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c index dce6632daae1..ae2b2669af1b 100644 --- a/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/drivers/isdn/hardware/mISDN/avmfritz.c @@ -156,7 +156,7 @@ _set_debug(struct fritzcard *card) } static int -set_debug(const char *val, struct kernel_param *kp) +set_debug(const char *val, const struct kernel_param *kp) { int ret; struct fritzcard *card; diff --git a/drivers/isdn/hardware/mISDN/hfc_multi.h b/drivers/isdn/hardware/mISDN/hfc_multi.h index c601f880141e..5acf826d913c 100644 --- a/drivers/isdn/hardware/mISDN/hfc_multi.h +++ b/drivers/isdn/hardware/mISDN/hfc_multi.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * see notice in hfc_multi.c */ diff --git a/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h b/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h index 8a254747768e..b0d772340e16 100644 --- a/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h +++ b/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * For License see notice in hfc_multi.c * diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 3cf07b8ced1c..4d85645c87f7 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -2855,7 +2855,7 @@ irq_notforus: */ static void -hfcmulti_dbusy_timer(struct hfc_multi *hc) +hfcmulti_dbusy_timer(struct timer_list *t) { } @@ -3877,8 +3877,7 @@ hfcmulti_initmode(struct dchannel *dch) if (hc->dnum[pt]) { mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol, -1, 0, -1, 0); - setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer, - (long)dch); + timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0); } for (i = 1; i <= 31; i++) { if (!((1 << i) & hc->bmask[pt])) /* skip unused chan */ @@ -3984,8 +3983,7 @@ hfcmulti_initmode(struct dchannel *dch) hc->chan[i].slot_rx = -1; hc->chan[i].conf = -1; mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0); - setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer, - (long)dch); + timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0); hc->chan[i - 2].slot_tx = -1; hc->chan[i - 2].slot_rx = -1; hc->chan[i - 2].conf = -1; diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index d2e401a8090e..34c93874af23 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -301,8 +301,9 @@ reset_hfcpci(struct hfc_pci *hc) * Timer function called when kernel timer expires */ static void -hfcpci_Timer(struct hfc_pci *hc) +hfcpci_Timer(struct timer_list *t) { + struct hfc_pci *hc = from_timer(hc, t, hw.timer); hc->hw.timer.expires = jiffies + 75; /* WD RESET */ /* @@ -1241,7 +1242,7 @@ hfcpci_int(int intno, void *dev_id) * timer callback for D-chan busy resolution. Currently no function */ static void -hfcpci_dbusy_timer(struct hfc_pci *hc) +hfcpci_dbusy_timer(struct timer_list *t) { } @@ -1717,8 +1718,7 @@ static void inithfcpci(struct hfc_pci *hc) { printk(KERN_DEBUG "inithfcpci: entered\n"); - setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer, - (long)&hc->dch); + timer_setup(&hc->dch.timer, hfcpci_dbusy_timer, 0); hc->chanlimit = 2; mode_hfcpci(&hc->bch[0], 1, -1); mode_hfcpci(&hc->bch[1], 2, -1); @@ -2043,7 +2043,7 @@ setup_hw(struct hfc_pci *hc) Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); /* At this point the needed PCI config is done */ /* fifos are still not enabled */ - setup_timer(&hc->hw.timer, (void *)hfcpci_Timer, (long)hc); + timer_setup(&hc->hw.timer, hfcpci_Timer, 0); /* default PCM master */ test_and_set_bit(HFC_CFG_MASTER, &hc->cfg); return 0; @@ -2265,7 +2265,7 @@ static struct pci_driver hfc_driver = { }; static int -_hfcpci_softirq(struct device *dev, void *arg) +_hfcpci_softirq(struct device *dev, void *unused) { struct hfc_pci *hc = dev_get_drvdata(dev); struct bchannel *bch; @@ -2290,9 +2290,9 @@ _hfcpci_softirq(struct device *dev, void *arg) } static void -hfcpci_softirq(void *arg) +hfcpci_softirq(struct timer_list *unused) { - WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, arg, + WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, NULL, _hfcpci_softirq) != 0); /* if next event would be in the past ... */ @@ -2327,9 +2327,7 @@ HFC_init(void) if (poll != HFCPCI_BTRANS_THRESHOLD) { printk(KERN_INFO "%s: Using alternative poll value of %d\n", __func__, poll); - hfc_tl.function = (void *)hfcpci_softirq; - hfc_tl.data = 0; - init_timer(&hfc_tl); + timer_setup(&hfc_tl, hfcpci_softirq, 0); hfc_tl.expires = jiffies + tics; hfc_jiffies = hfc_tl.expires; add_timer(&hfc_tl); diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.h b/drivers/isdn/hardware/mISDN/hfcsusb.h index 5f8f1d9cac11..e4fa2a2824af 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.h +++ b/drivers/isdn/hardware/mISDN/hfcsusb.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * hfcsusb.h, HFC-S USB mISDN driver */ diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index d5bdbaf93a1a..1fc290659e94 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c @@ -244,7 +244,7 @@ _set_debug(struct inf_hw *card) } static int -set_debug(const char *val, struct kernel_param *kp) +set_debug(const char *val, const struct kernel_param *kp) { int ret; struct inf_hw *card; diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index e240010b93fa..4d78f870435e 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c @@ -172,7 +172,6 @@ isac_fill_fifo(struct isac_hw *isac) pr_debug("%s: %s dbusytimer running\n", isac->name, __func__); del_timer(&isac->dch.timer); } - init_timer(&isac->dch.timer); isac->dch.timer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000); add_timer(&isac->dch.timer); if (isac->dch.debug & DEBUG_HW_DFIFO) { @@ -727,8 +726,9 @@ isac_release(struct isac_hw *isac) } static void -dbusy_timer_handler(struct isac_hw *isac) +dbusy_timer_handler(struct timer_list *t) { + struct isac_hw *isac = from_timer(isac, t, dch.timer); int rbch, star; u_long flags; @@ -796,8 +796,7 @@ isac_init(struct isac_hw *isac) } isac->mon_tx = NULL; isac->mon_rx = NULL; - setup_timer(&isac->dch.timer, (void *)dbusy_timer_handler, - (long)isac); + timer_setup(&isac->dch.timer, dbusy_timer_handler, 0); isac->mocr = 0xaa; if (isac->type & IPAC_TYPE_ISACX) { /* Disable all IRQ */ diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c index 5b078591b6ee..b791688d0228 100644 --- a/drivers/isdn/hardware/mISDN/mISDNisar.c +++ b/drivers/isdn/hardware/mISDN/mISDNisar.c @@ -1146,9 +1146,9 @@ mISDNisar_irq(struct isar_hw *isar) EXPORT_SYMBOL(mISDNisar_irq); static void -ftimer_handler(unsigned long data) +ftimer_handler(struct timer_list *t) { - struct isar_ch *ch = (struct isar_ch *)data; + struct isar_ch *ch = from_timer(ch, t, ftimer); pr_debug("%s: ftimer flags %lx\n", ch->is->name, ch->bch.Flags); test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags); @@ -1635,11 +1635,9 @@ init_isar(struct isar_hw *isar) } if (isar->version != 1) return -EINVAL; - setup_timer(&isar->ch[0].ftimer, &ftimer_handler, - (long)&isar->ch[0]); + timer_setup(&isar->ch[0].ftimer, ftimer_handler, 0); test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags); - setup_timer(&isar->ch[1].ftimer, &ftimer_handler, - (long)&isar->ch[1]); + timer_setup(&isar->ch[1].ftimer, ftimer_handler, 0); test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags); return 0; } diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 6a6d848bd18e..89d9ba8ed535 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c @@ -111,7 +111,7 @@ _set_debug(struct tiger_hw *card) } static int -set_debug(const char *val, struct kernel_param *kp) +set_debug(const char *val, const struct kernel_param *kp) { int ret; struct tiger_hw *card; diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c index 9815bb4eec9c..1f1446ed8d5f 100644 --- a/drivers/isdn/hardware/mISDN/speedfax.c +++ b/drivers/isdn/hardware/mISDN/speedfax.c @@ -94,7 +94,7 @@ _set_debug(struct sfax_hw *card) } static int -set_debug(const char *val, struct kernel_param *kp) +set_debug(const char *val, const struct kernel_param *kp) { int ret; struct sfax_hw *card; diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c index d80072fef434..5acf6ab67cd3 100644 --- a/drivers/isdn/hardware/mISDN/w6692.c +++ b/drivers/isdn/hardware/mISDN/w6692.c @@ -101,7 +101,7 @@ _set_debug(struct w6692_hw *card) } static int -set_debug(const char *val, struct kernel_param *kp) +set_debug(const char *val, const struct kernel_param *kp) { int ret; struct w6692_hw *card; @@ -311,7 +311,6 @@ W6692_fill_Dfifo(struct w6692_hw *card) pr_debug("%s: fill_Dfifo dbusytimer running\n", card->name); del_timer(&dch->timer); } - init_timer(&dch->timer); dch->timer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ) / 1000); add_timer(&dch->timer); if (debug & DEBUG_HW_DFIFO) { @@ -819,8 +818,9 @@ w6692_irq(int intno, void *dev_id) } static void -dbusy_timer_handler(struct dchannel *dch) +dbusy_timer_handler(struct timer_list *t) { + struct dchannel *dch = from_timer(dch, t, timer); struct w6692_hw *card = dch->hw; int rbch, star; u_long flags; @@ -852,8 +852,7 @@ static void initW6692(struct w6692_hw *card) { u8 val; - setup_timer(&card->dch.timer, (void *)dbusy_timer_handler, - (u_long)&card->dch); + timer_setup(&card->dch.timer, dbusy_timer_handler, 0); w6692_mode(&card->bc[0], ISDN_P_NONE); w6692_mode(&card->bc[1], ISDN_P_NONE); WriteW6692(card, W_D_CTL, 0x00); |