Skip to content

Commit b13fecb

Browse files
committed
treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()
This converts all the existing DECLARE_TASKLET() (and ...DISABLED) macros with DECLARE_TASKLET_OLD() in preparation for refactoring the tasklet callback type. All existing DECLARE_TASKLET() users had a "0" data argument, it has been removed here as well. Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent f9dc371 commit b13fecb

File tree

16 files changed

+26
-21
lines changed

16 files changed

+26
-21
lines changed

drivers/input/keyboard/omap-keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct omap_kp {
4646
unsigned short keymap[];
4747
};
4848

49-
static DECLARE_TASKLET_DISABLED(kp_tasklet, omap_kp_tasklet, 0);
49+
static DECLARE_TASKLET_DISABLED_OLD(kp_tasklet, omap_kp_tasklet);
5050

5151
static unsigned int *row_gpios;
5252
static unsigned int *col_gpios;

drivers/input/serio/hil_mlc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static struct timer_list hil_mlcs_kicker;
7777
static int hil_mlcs_probe;
7878

7979
static void hil_mlcs_process(unsigned long unused);
80-
static DECLARE_TASKLET_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0);
80+
static DECLARE_TASKLET_DISABLED_OLD(hil_mlcs_tasklet, hil_mlcs_process);
8181

8282

8383
/* #define HIL_MLC_DEBUG */

drivers/net/wan/farsync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ static void do_bottom_half_rx(struct fst_card_info *card);
569569
static void fst_process_tx_work_q(unsigned long work_q);
570570
static void fst_process_int_work_q(unsigned long work_q);
571571

572-
static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
573-
static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
572+
static DECLARE_TASKLET_OLD(fst_tx_task, fst_process_tx_work_q);
573+
static DECLARE_TASKLET_OLD(fst_int_task, fst_process_int_work_q);
574574

575575
static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
576576
static spinlock_t fst_work_q_lock;

drivers/s390/crypto/ap_bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static DECLARE_WORK(ap_scan_work, ap_scan_bus);
9393
* Tasklet & timer for AP request polling and interrupts
9494
*/
9595
static void ap_tasklet_fn(unsigned long);
96-
static DECLARE_TASKLET(ap_tasklet, ap_tasklet_fn, 0);
96+
static DECLARE_TASKLET_OLD(ap_tasklet, ap_tasklet_fn);
9797
static DECLARE_WAIT_QUEUE_HEAD(ap_poll_wait);
9898
static struct task_struct *ap_poll_kthread;
9999
static DEFINE_MUTEX(ap_poll_thread_mutex);

drivers/staging/most/dim2/dim2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(fcnt, "Num of frames per sub-buffer for sync channels as a powe
4646
static DEFINE_SPINLOCK(dim_lock);
4747

4848
static void dim2_tasklet_fn(unsigned long data);
49-
static DECLARE_TASKLET(dim2_tasklet, dim2_tasklet_fn, 0);
49+
static DECLARE_TASKLET_OLD(dim2_tasklet, dim2_tasklet_fn);
5050

5151
/**
5252
* struct hdm_channel - private structure to keep channel specific data

drivers/staging/octeon/ethernet-tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#endif
4242

4343
static void cvm_oct_tx_do_cleanup(unsigned long arg);
44-
static DECLARE_TASKLET(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup, 0);
44+
static DECLARE_TASKLET_OLD(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup);
4545

4646
/* Maximum number of SKBs to try to free per xmit packet. */
4747
#define MAX_SKB_TO_FREE (MAX_OUT_QUEUE_DEPTH * 2)

drivers/tty/vt/keyboard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ static void kbd_bh(unsigned long dummy)
12361236
}
12371237
}
12381238

1239-
DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0);
1239+
DECLARE_TASKLET_DISABLED_OLD(keyboard_tasklet, kbd_bh);
12401240

12411241
#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\
12421242
defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\

drivers/usb/gadget/udc/snps_udc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int stop_pollstall_timer;
9696
static DECLARE_COMPLETION(on_pollstall_exit);
9797

9898
/* tasklet for usb disconnect */
99-
static DECLARE_TASKLET(disconnect_tasklet, udc_tasklet_disconnect, 0);
99+
static DECLARE_TASKLET_OLD(disconnect_tasklet, udc_tasklet_disconnect);
100100

101101
/* endpoint names used for print */
102102
static const char ep0_string[] = "ep0in";

drivers/usb/host/fhci-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ static void process_done_list(unsigned long data)
677677
enable_irq(fhci_to_hcd(fhci)->irq);
678678
}
679679

680-
DECLARE_TASKLET(fhci_tasklet, process_done_list, 0);
680+
DECLARE_TASKLET_OLD(fhci_tasklet, process_done_list);
681681

682682
/* transfer complted callback */
683683
u32 fhci_transfer_confirm_callback(struct fhci_hcd *fhci)

include/linux/interrupt.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,17 @@ struct tasklet_struct
612612
unsigned long data;
613613
};
614614

615-
#define DECLARE_TASKLET(name, func, data) \
616-
struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
617-
618-
#define DECLARE_TASKLET_DISABLED(name, func, data) \
619-
struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
615+
#define DECLARE_TASKLET_OLD(name, _func) \
616+
struct tasklet_struct name = { \
617+
.count = ATOMIC_INIT(0), \
618+
.func = _func, \
619+
}
620620

621+
#define DECLARE_TASKLET_DISABLED_OLD(name, _func) \
622+
struct tasklet_struct name = { \
623+
.count = ATOMIC_INIT(1), \
624+
.func = _func, \
625+
}
621626

622627
enum
623628
{

kernel/backtracetest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void backtrace_test_irq_callback(unsigned long data)
2929
complete(&backtrace_work);
3030
}
3131

32-
static DECLARE_TASKLET(backtrace_tasklet, &backtrace_test_irq_callback, 0);
32+
static DECLARE_TASKLET_OLD(backtrace_tasklet, &backtrace_test_irq_callback);
3333

3434
static void backtrace_test_irq(void)
3535
{

kernel/debug/debug_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ static void kgdb_tasklet_bpt(unsigned long ing)
10681068
atomic_set(&kgdb_break_tasklet_var, 0);
10691069
}
10701070

1071-
static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt, 0);
1071+
static DECLARE_TASKLET_OLD(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt);
10721072

10731073
void kgdb_schedule_breakpoint(void)
10741074
{

kernel/irq/resend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void resend_irqs(unsigned long arg)
4545
}
4646

4747
/* Tasklet to handle resend: */
48-
static DECLARE_TASKLET(resend_tasklet, resend_irqs, 0);
48+
static DECLARE_TASKLET_OLD(resend_tasklet, resend_irqs);
4949

5050
static int irq_sw_resend(struct irq_desc *desc)
5151
{

net/atm/pppoatm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)
393393
* Each PPPoATM instance has its own tasklet - this is just a
394394
* prototypical one used to initialize them
395395
*/
396-
static const DECLARE_TASKLET(tasklet_proto, pppoatm_wakeup_sender, 0);
396+
static const DECLARE_TASKLET_OLD(tasklet_proto, pppoatm_wakeup_sender);
397397
if (copy_from_user(&be, arg, sizeof be))
398398
return -EFAULT;
399399
if (be.encaps != PPPOATM_ENCAPS_AUTODETECT &&

net/iucv/iucv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static LIST_HEAD(iucv_task_queue);
105105
* The tasklet for fast delivery of iucv interrupts.
106106
*/
107107
static void iucv_tasklet_fn(unsigned long);
108-
static DECLARE_TASKLET(iucv_tasklet, iucv_tasklet_fn,0);
108+
static DECLARE_TASKLET_OLD(iucv_tasklet, iucv_tasklet_fn);
109109

110110
/*
111111
* Queue of interrupt buffers for delivery via a work queue

sound/drivers/pcsp/pcsp_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void pcsp_call_pcm_elapsed(unsigned long priv)
3636
}
3737
}
3838

39-
static DECLARE_TASKLET(pcsp_pcm_tasklet, pcsp_call_pcm_elapsed, 0);
39+
static DECLARE_TASKLET_OLD(pcsp_pcm_tasklet, pcsp_call_pcm_elapsed);
4040

4141
/* write the port and returns the next expire time in ns;
4242
* called at the trigger-start and in hrtimer callback

0 commit comments

Comments
 (0)