WorkStruct: make allyesconfig

Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells 2006-11-22 14:57:56 +00:00
parent 65f27f3844
commit c4028958b6
282 changed files with 1775 additions and 1454 deletions

View File

@ -51,10 +51,10 @@ static void mce_checkregs (void *info)
}
}
static void mce_work_fn(void *data);
static DECLARE_WORK(mce_work, mce_work_fn, NULL);
static void mce_work_fn(struct work_struct *work);
static DECLARE_DELAYED_WORK(mce_work, mce_work_fn);
static void mce_work_fn(void *data)
static void mce_work_fn(struct work_struct *work)
{
on_each_cpu(mce_checkregs, NULL, 1, 1);
schedule_delayed_work(&mce_work, MCE_RATE);

View File

@ -1049,13 +1049,15 @@ void cpu_exit_clear(void)
struct warm_boot_cpu_info {
struct completion *complete;
struct work_struct task;
int apicid;
int cpu;
};
static void __cpuinit do_warm_boot_cpu(void *p)
static void __cpuinit do_warm_boot_cpu(struct work_struct *work)
{
struct warm_boot_cpu_info *info = p;
struct warm_boot_cpu_info *info =
container_of(work, struct warm_boot_cpu_info, task);
do_boot_cpu(info->apicid, info->cpu);
complete(info->complete);
}
@ -1064,7 +1066,6 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
{
DECLARE_COMPLETION_ONSTACK(done);
struct warm_boot_cpu_info info;
struct work_struct task;
int apicid, ret;
struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu);
@ -1089,7 +1090,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
info.complete = &done;
info.apicid = apicid;
info.cpu = cpu;
INIT_WORK(&task, do_warm_boot_cpu, &info);
INIT_WORK(&info.task, do_warm_boot_cpu);
tsc_sync_disabled = 1;
@ -1097,7 +1098,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
KERNEL_PGD_PTRS);
flush_tlb_all();
schedule_work(&task);
schedule_work(&info.task);
wait_for_completion(&done);
tsc_sync_disabled = 0;

View File

@ -217,7 +217,7 @@ static unsigned int cpufreq_delayed_issched = 0;
static unsigned int cpufreq_init = 0;
static struct work_struct cpufreq_delayed_get_work;
static void handle_cpufreq_delayed_get(void *v)
static void handle_cpufreq_delayed_get(struct work_struct *work)
{
unsigned int cpu;
@ -306,7 +306,7 @@ static int __init cpufreq_tsc(void)
{
int ret;
INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL);
INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get);
ret = cpufreq_register_notifier(&time_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
if (!ret)

View File

@ -37,8 +37,8 @@
/* EEH event workqueue setup. */
static DEFINE_SPINLOCK(eeh_eventlist_lock);
LIST_HEAD(eeh_eventlist);
static void eeh_thread_launcher(void *);
DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL);
static void eeh_thread_launcher(struct work_struct *);
DECLARE_WORK(eeh_event_wq, eeh_thread_launcher);
/* Serialize reset sequences for a given pci device */
DEFINE_MUTEX(eeh_event_mutex);
@ -103,7 +103,7 @@ static int eeh_event_handler(void * dummy)
* eeh_thread_launcher
* @dummy - unused
*/
static void eeh_thread_launcher(void *dummy)
static void eeh_thread_launcher(struct work_struct *dummy)
{
if (kernel_thread(eeh_event_handler, NULL, CLONE_KERNEL) < 0)
printk(KERN_ERR "Failed to start EEH daemon\n");

View File

@ -135,7 +135,7 @@ static int idt77252_change_qos(struct atm_vcc *vcc, struct atm_qos *qos,
int flags);
static int idt77252_proc_read(struct atm_dev *dev, loff_t * pos,
char *page);
static void idt77252_softint(void *dev_id);
static void idt77252_softint(struct work_struct *work);
static struct atmdev_ops idt77252_ops =
@ -2866,9 +2866,10 @@ out:
}
static void
idt77252_softint(void *dev_id)
idt77252_softint(struct work_struct *work)
{
struct idt77252_dev *card = dev_id;
struct idt77252_dev *card =
container_of(work, struct idt77252_dev, tqueue);
u32 stat;
int done;
@ -3697,7 +3698,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
card->pcidev = pcidev;
sprintf(card->name, "idt77252-%d", card->index);
INIT_WORK(&card->tqueue, idt77252_softint, (void *)card);
INIT_WORK(&card->tqueue, idt77252_softint);
membase = pci_resource_start(pcidev, 1);
srambase = pci_resource_start(pcidev, 2);

View File

@ -159,7 +159,7 @@ void aoecmd_work(struct aoedev *d);
void aoecmd_cfg(ushort aoemajor, unsigned char aoeminor);
void aoecmd_ata_rsp(struct sk_buff *);
void aoecmd_cfg_rsp(struct sk_buff *);
void aoecmd_sleepwork(void *vp);
void aoecmd_sleepwork(struct work_struct *);
struct sk_buff *new_skb(ulong);
int aoedev_init(void);

View File

@ -408,9 +408,9 @@ rexmit_timer(ulong vp)
/* this function performs work that has been deferred until sleeping is OK
*/
void
aoecmd_sleepwork(void *vp)
aoecmd_sleepwork(struct work_struct *work)
{
struct aoedev *d = (struct aoedev *) vp;
struct aoedev *d = container_of(work, struct aoedev, work);
if (d->flags & DEVFL_GDALLOC)
aoeblk_gdalloc(d);

View File

@ -88,7 +88,7 @@ aoedev_newdev(ulong nframes)
kfree(d);
return NULL;
}
INIT_WORK(&d->work, aoecmd_sleepwork, d);
INIT_WORK(&d->work, aoecmd_sleepwork);
spin_lock_init(&d->lock);
init_timer(&d->timer);
d->timer.data = (ulong) d;

View File

@ -352,19 +352,19 @@ static enum action (*phase)(void);
static void run_fsm(void);
static void ps_tq_int( void *data);
static void ps_tq_int(struct work_struct *work);
static DECLARE_WORK(fsm_tq, ps_tq_int, NULL);
static DECLARE_DELAYED_WORK(fsm_tq, ps_tq_int);
static void schedule_fsm(void)
{
if (!nice)
schedule_work(&fsm_tq);
schedule_delayed_work(&fsm_tq, 0);
else
schedule_delayed_work(&fsm_tq, nice-1);
}
static void ps_tq_int(void *data)
static void ps_tq_int(struct work_struct *work)
{
run_fsm();
}

View File

@ -35,7 +35,7 @@
#include <linux/sched.h>
#include <linux/workqueue.h>
static void ps_tq_int( void *data);
static void ps_tq_int(struct work_struct *work);
static void (* ps_continuation)(void);
static int (* ps_ready)(void);
@ -45,7 +45,7 @@ static int ps_nice = 0;
static DEFINE_SPINLOCK(ps_spinlock __attribute__((unused)));
static DECLARE_WORK(ps_tq, ps_tq_int, NULL);
static DECLARE_DELAYED_WORK(ps_tq, ps_tq_int);
static void ps_set_intr(void (*continuation)(void),
int (*ready)(void),
@ -63,14 +63,14 @@ static void ps_set_intr(void (*continuation)(void),
if (!ps_tq_active) {
ps_tq_active = 1;
if (!ps_nice)
schedule_work(&ps_tq);
schedule_delayed_work(&ps_tq, 0);
else
schedule_delayed_work(&ps_tq, ps_nice-1);
}
spin_unlock_irqrestore(&ps_spinlock,flags);
}
static void ps_tq_int(void *data)
static void ps_tq_int(struct work_struct *work)
{
void (*con)(void);
unsigned long flags;
@ -92,7 +92,7 @@ static void ps_tq_int(void *data)
}
ps_tq_active = 1;
if (!ps_nice)
schedule_work(&ps_tq);
schedule_delayed_work(&ps_tq, 0);
else
schedule_delayed_work(&ps_tq, ps_nice-1);
spin_unlock_irqrestore(&ps_spinlock,flags);

View File

@ -1244,9 +1244,10 @@ out:
return IRQ_RETVAL(handled);
}
static void carm_fsm_task (void *_data)
static void carm_fsm_task (struct work_struct *work)
{
struct carm_host *host = _data;
struct carm_host *host =
container_of(work, struct carm_host, fsm_task);
unsigned long flags;
unsigned int state;
int rc, i, next_dev;
@ -1619,7 +1620,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
host->pdev = pdev;
host->flags = pci_dac ? FL_DAC : 0;
spin_lock_init(&host->lock);
INIT_WORK(&host->fsm_task, carm_fsm_task, host);
INIT_WORK(&host->fsm_task, carm_fsm_task);
init_completion(&host->probe_comp);
for (i = 0; i < ARRAY_SIZE(host->req); i++)

View File

@ -376,7 +376,7 @@ static int ub_submit_clear_stall(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
int stalled_pipe);
static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd);
static void ub_reset_enter(struct ub_dev *sc, int try);
static void ub_reset_task(void *arg);
static void ub_reset_task(struct work_struct *work);
static int ub_sync_tur(struct ub_dev *sc, struct ub_lun *lun);
static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun,
struct ub_capacity *ret);
@ -1558,9 +1558,9 @@ static void ub_reset_enter(struct ub_dev *sc, int try)
schedule_work(&sc->reset_work);
}
static void ub_reset_task(void *arg)
static void ub_reset_task(struct work_struct *work)
{
struct ub_dev *sc = arg;
struct ub_dev *sc = container_of(work, struct ub_dev, reset_work);
unsigned long flags;
struct list_head *p;
struct ub_lun *lun;
@ -2179,7 +2179,7 @@ static int ub_probe(struct usb_interface *intf,
usb_init_urb(&sc->work_urb);
tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc);
atomic_set(&sc->poison, 0);
INIT_WORK(&sc->reset_work, ub_reset_task, sc);
INIT_WORK(&sc->reset_work, ub_reset_task);
init_waitqueue_head(&sc->reset_wait);
init_timer(&sc->work_timer);

View File

@ -157,9 +157,10 @@ static void bcm203x_complete(struct urb *urb)
}
}
static void bcm203x_work(void *user_data)
static void bcm203x_work(struct work_struct *work)
{
struct bcm203x_data *data = user_data;
struct bcm203x_data *data =
container_of(work, struct bcm203x_data, work);
if (usb_submit_urb(data->urb, GFP_ATOMIC) < 0)
BT_ERR("Can't submit URB");
@ -246,7 +247,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
release_firmware(firmware);
INIT_WORK(&data->work, bcm203x_work, (void *) data);
INIT_WORK(&data->work, bcm203x_work);
usb_set_intfdata(intf, data);

View File

@ -926,9 +926,10 @@ cy_sched_event(struct cyclades_port *info, int event)
* had to poll every port to see if that port needed servicing.
*/
static void
do_softint(void *private_)
do_softint(struct work_struct *work)
{
struct cyclades_port *info = (struct cyclades_port *) private_;
struct cyclades_port *info =
container_of(work, struct cyclades_port, tqueue);
struct tty_struct *tty;
tty = info->tty;
@ -5328,7 +5329,7 @@ cy_init(void)
info->blocked_open = 0;
info->default_threshold = 0;
info->default_timeout = 0;
INIT_WORK(&info->tqueue, do_softint, info);
INIT_WORK(&info->tqueue, do_softint);
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
init_waitqueue_head(&info->shutdown_wait);
@ -5403,7 +5404,7 @@ cy_init(void)
info->blocked_open = 0;
info->default_threshold = 0;
info->default_timeout = 0;
INIT_WORK(&info->tqueue, do_softint, info);
INIT_WORK(&info->tqueue, do_softint);
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
init_waitqueue_head(&info->shutdown_wait);

View File

@ -500,9 +500,9 @@ via_dmablit_timer(unsigned long data)
static void
via_dmablit_workqueue(void *data)
via_dmablit_workqueue(struct work_struct *work)
{
drm_via_blitq_t *blitq = (drm_via_blitq_t *) data;
drm_via_blitq_t *blitq = container_of(work, drm_via_blitq_t, wq);
drm_device_t *dev = blitq->dev;
unsigned long irqsave;
drm_via_sg_info_t *cur_sg;
@ -571,7 +571,7 @@ via_init_dmablit(drm_device_t *dev)
DRM_INIT_WAITQUEUE(blitq->blit_queue + j);
}
DRM_INIT_WAITQUEUE(&blitq->busy_queue);
INIT_WORK(&blitq->wq, via_dmablit_workqueue, blitq);
INIT_WORK(&blitq->wq, via_dmablit_workqueue);
init_timer(&blitq->poll_timer);
blitq->poll_timer.function = &via_dmablit_timer;
blitq->poll_timer.data = (unsigned long) blitq;

View File

@ -200,7 +200,7 @@ static int pc_ioctl(struct tty_struct *, struct file *,
static int info_ioctl(struct tty_struct *, struct file *,
unsigned int, unsigned long);
static void pc_set_termios(struct tty_struct *, struct termios *);
static void do_softint(void *);
static void do_softint(struct work_struct *work);
static void pc_stop(struct tty_struct *);
static void pc_start(struct tty_struct *);
static void pc_throttle(struct tty_struct * tty);
@ -1505,7 +1505,7 @@ static void post_fep_init(unsigned int crd)
ch->brdchan = bc;
ch->mailbox = gd;
INIT_WORK(&ch->tqueue, do_softint, ch);
INIT_WORK(&ch->tqueue, do_softint);
ch->board = &boards[crd];
spin_lock_irqsave(&epca_lock, flags);
@ -2566,9 +2566,9 @@ static void pc_set_termios(struct tty_struct *tty, struct termios *old_termios)
/* --------------------- Begin do_softint ----------------------- */
static void do_softint(void *private_)
static void do_softint(struct work_struct *work)
{ /* Begin do_softint */
struct channel *ch = (struct channel *) private_;
struct channel *ch = container_of(work, struct channel, tqueue);
/* Called in response to a modem change event */
if (ch && ch->magic == EPCA_MAGIC) { /* Begin EPCA_MAGIC */
struct tty_struct *tty = ch->tty;

View File

@ -723,9 +723,10 @@ static irqreturn_t rs_interrupt_single(int irq, void *dev_id)
* -------------------------------------------------------------------
*/
static void do_softint(void *private_)
static void do_softint(struct work_struct *work)
{
struct esp_struct *info = (struct esp_struct *) private_;
struct esp_struct *info =
container_of(work, struct esp_struct, tqueue);
struct tty_struct *tty;
tty = info->tty;
@ -746,9 +747,10 @@ static void do_softint(void *private_)
* do_serial_hangup() -> tty->hangup() -> esp_hangup()
*
*/
static void do_serial_hangup(void *private_)
static void do_serial_hangup(struct work_struct *work)
{
struct esp_struct *info = (struct esp_struct *) private_;
struct esp_struct *info =
container_of(work, struct esp_struct, tqueue_hangup);
struct tty_struct *tty;
tty = info->tty;
@ -2501,8 +2503,8 @@ static int __init espserial_init(void)
info->magic = ESP_MAGIC;
info->close_delay = 5*HZ/10;
info->closing_wait = 30*HZ;
INIT_WORK(&info->tqueue, do_softint, info);
INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info);
INIT_WORK(&info->tqueue, do_softint);
INIT_WORK(&info->tqueue_hangup, do_serial_hangup);
info->config.rx_timeout = rx_timeout;
info->config.flow_on = flow_on;
info->config.flow_off = flow_off;

View File

@ -102,7 +102,7 @@ static void gen_rtc_interrupt(unsigned long arg);
* Routine to poll RTC seconds field for change as often as possible,
* after first RTC_UIE use timer to reduce polling
*/
static void genrtc_troutine(void *data)
static void genrtc_troutine(struct work_struct *work)
{
unsigned int tmp = get_rtc_ss();
@ -255,7 +255,7 @@ static inline int gen_set_rtc_irq_bit(unsigned char bit)
irq_active = 1;
stop_rtc_timers = 0;
lostint = 0;
INIT_WORK(&genrtc_task, genrtc_troutine, NULL);
INIT_WORK(&genrtc_task, genrtc_troutine);
oldsecs = get_rtc_ss();
init_timer(&timer_task);

View File

@ -69,7 +69,7 @@
#define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
struct hvsi_struct {
struct work_struct writer;
struct delayed_work writer;
struct work_struct handshaker;
wait_queue_head_t emptyq; /* woken when outbuf is emptied */
wait_queue_head_t stateq; /* woken when HVSI state changes */
@ -744,9 +744,10 @@ static int hvsi_handshake(struct hvsi_struct *hp)
return 0;
}
static void hvsi_handshaker(void *arg)
static void hvsi_handshaker(struct work_struct *work)
{
struct hvsi_struct *hp = (struct hvsi_struct *)arg;
struct hvsi_struct *hp =
container_of(work, struct hvsi_struct, handshaker);
if (hvsi_handshake(hp) >= 0)
return;
@ -951,9 +952,10 @@ static void hvsi_push(struct hvsi_struct *hp)
}
/* hvsi_write_worker will keep rescheduling itself until outbuf is empty */
static void hvsi_write_worker(void *arg)
static void hvsi_write_worker(struct work_struct *work)
{
struct hvsi_struct *hp = (struct hvsi_struct *)arg;
struct hvsi_struct *hp =
container_of(work, struct hvsi_struct, writer.work);
unsigned long flags;
#ifdef DEBUG
static long start_j = 0;
@ -1287,8 +1289,8 @@ static int __init hvsi_console_init(void)
}
hp = &hvsi_ports[hvsi_count];
INIT_WORK(&hp->writer, hvsi_write_worker, hp);
INIT_WORK(&hp->handshaker, hvsi_handshaker, hp);
INIT_DELAYED_WORK(&hp->writer, hvsi_write_worker);
INIT_WORK(&hp->handshaker, hvsi_handshaker);
init_waitqueue_head(&hp->emptyq);
init_waitqueue_head(&hp->stateq);
spin_lock_init(&hp->lock);

View File

@ -84,8 +84,8 @@ static void iiSendPendingMail(i2eBordStrPtr);
static void serviceOutgoingFifo(i2eBordStrPtr);
// Functions defined in ip2.c as part of interrupt handling
static void do_input(void *);
static void do_status(void *);
static void do_input(struct work_struct *);
static void do_status(struct work_struct *);
//***************
//* Debug Data *
@ -331,8 +331,8 @@ i2InitChannels ( i2eBordStrPtr pB, int nChannels, i2ChanStrPtr pCh)
pCh->ClosingWaitTime = 30*HZ;
// Initialize task queue objects
INIT_WORK(&pCh->tqueue_input, do_input, pCh);
INIT_WORK(&pCh->tqueue_status, do_status, pCh);
INIT_WORK(&pCh->tqueue_input, do_input);
INIT_WORK(&pCh->tqueue_status, do_status);
#ifdef IP2DEBUG_TRACE
pCh->trace = ip2trace;
@ -1573,7 +1573,7 @@ i2StripFifo(i2eBordStrPtr pB)
#ifdef USE_IQ
schedule_work(&pCh->tqueue_input);
#else
do_input(pCh);
do_input(&pCh->tqueue_input);
#endif
// Note we do not need to maintain any flow-control credits at this
@ -1810,7 +1810,7 @@ i2StripFifo(i2eBordStrPtr pB)
#ifdef USE_IQ
schedule_work(&pCh->tqueue_status);
#else
do_status(pCh);
do_status(&pCh->tqueue_status);
#endif
}
}

View File

@ -189,12 +189,12 @@ static int ip2_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
static void set_irq(int, int);
static void ip2_interrupt_bh(i2eBordStrPtr pB);
static void ip2_interrupt_bh(struct work_struct *work);
static irqreturn_t ip2_interrupt(int irq, void *dev_id);
static void ip2_poll(unsigned long arg);
static inline void service_all_boards(void);
static void do_input(void *p);
static void do_status(void *p);
static void do_input(struct work_struct *);
static void do_status(struct work_struct *);
static void ip2_wait_until_sent(PTTY,int);
@ -918,7 +918,7 @@ ip2_init_board( int boardnum )
pCh++;
}
ex_exit:
INIT_WORK(&pB->tqueue_interrupt, (void(*)(void*)) ip2_interrupt_bh, pB);
INIT_WORK(&pB->tqueue_interrupt, ip2_interrupt_bh);
return;
err_release_region:
@ -1125,8 +1125,8 @@ service_all_boards(void)
/******************************************************************************/
/* Function: ip2_interrupt_bh(pB) */
/* Parameters: pB - pointer to the board structure */
/* Function: ip2_interrupt_bh(work) */
/* Parameters: work - pointer to the board structure */
/* Returns: Nothing */
/* */
/* Description: */
@ -1135,8 +1135,9 @@ service_all_boards(void)
/* */
/******************************************************************************/
static void
ip2_interrupt_bh(i2eBordStrPtr pB)
ip2_interrupt_bh(struct work_struct *work)
{
i2eBordStrPtr pB = container_of(work, i2eBordStr, tqueue_interrupt);
// pB better well be set or we have a problem! We can only get
// here from the IMMEDIATE queue. Here, we process the boards.
// Checking pB doesn't cost much and it saves us from the sanity checkers.
@ -1245,9 +1246,9 @@ ip2_poll(unsigned long arg)
ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
}
static void do_input(void *p)
static void do_input(struct work_struct *work)
{
i2ChanStrPtr pCh = p;
i2ChanStrPtr pCh = container_of(work, i2ChanStr, tqueue_input);
unsigned long flags;
ip2trace(CHANN, ITRC_INPUT, 21, 0 );
@ -1279,9 +1280,9 @@ static inline void isig(int sig, struct tty_struct *tty, int flush)
}
}
static void do_status(void *p)
static void do_status(struct work_struct *work)
{
i2ChanStrPtr pCh = p;
i2ChanStrPtr pCh = container_of(work, i2ChanStr, tqueue_status);
int status;
status = i2GetStatus( pCh, (I2_BRK|I2_PAR|I2_FRA|I2_OVR) );

View File

@ -530,9 +530,9 @@ sched_again:
/* Interrupt handlers */
static void isicom_bottomhalf(void *data)
static void isicom_bottomhalf(struct work_struct *work)
{
struct isi_port *port = (struct isi_port *) data;
struct isi_port *port = container_of(work, struct isi_port, bh_tqueue);
struct tty_struct *tty = port->tty;
if (!tty)
@ -1474,9 +1474,9 @@ static void isicom_start(struct tty_struct *tty)
}
/* hangup et all */
static void do_isicom_hangup(void *data)
static void do_isicom_hangup(struct work_struct *work)
{
struct isi_port *port = data;
struct isi_port *port = container_of(work, struct isi_port, hangup_tq);
struct tty_struct *tty;
tty = port->tty;
@ -1966,8 +1966,8 @@ static int __devinit isicom_setup(void)
port->channel = channel;
port->close_delay = 50 * HZ/100;
port->closing_wait = 3000 * HZ/100;
INIT_WORK(&port->hangup_tq, do_isicom_hangup, port);
INIT_WORK(&port->bh_tqueue, isicom_bottomhalf, port);
INIT_WORK(&port->hangup_tq, do_isicom_hangup);
INIT_WORK(&port->bh_tqueue, isicom_bottomhalf);
port->status = 0;
init_waitqueue_head(&port->open_wait);
init_waitqueue_head(&port->close_wait);

View File

@ -222,7 +222,7 @@ static struct semaphore moxaBuffSem;
/*
* static functions:
*/
static void do_moxa_softint(void *);
static void do_moxa_softint(struct work_struct *);
static int moxa_open(struct tty_struct *, struct file *);
static void moxa_close(struct tty_struct *, struct file *);
static int moxa_write(struct tty_struct *, const unsigned char *, int);
@ -363,7 +363,7 @@ static int __init moxa_init(void)
for (i = 0, ch = moxaChannels; i < MAX_PORTS; i++, ch++) {
ch->type = PORT_16550A;
ch->port = i;
INIT_WORK(&ch->tqueue, do_moxa_softint, ch);
INIT_WORK(&ch->tqueue, do_moxa_softint);
ch->tty = NULL;
ch->close_delay = 5 * HZ / 10;
ch->closing_wait = 30 * HZ;
@ -509,9 +509,9 @@ static void __exit moxa_exit(void)
module_init(moxa_init);
module_exit(moxa_exit);
static void do_moxa_softint(void *private_)
static void do_moxa_softint(struct work_struct *work)
{
struct moxa_str *ch = (struct moxa_str *) private_;
struct moxa_str *ch = container_of(work, struct moxa_str, tqueue);
struct tty_struct *tty;
if (ch && (tty = ch->tty)) {

View File

@ -389,7 +389,7 @@ static int mxser_init(void);
/* static void mxser_poll(unsigned long); */
static int mxser_get_ISA_conf(int, struct mxser_hwconf *);
static int mxser_get_PCI_conf(int, int, int, struct mxser_hwconf *);
static void mxser_do_softint(void *);
static void mxser_do_softint(struct work_struct *);
static int mxser_open(struct tty_struct *, struct file *);
static void mxser_close(struct tty_struct *, struct file *);
static int mxser_write(struct tty_struct *, const unsigned char *, int);
@ -590,7 +590,7 @@ static int mxser_initbrd(int board, struct mxser_hwconf *hwconf)
info->custom_divisor = hwconf->baud_base[i] * 16;
info->close_delay = 5 * HZ / 10;
info->closing_wait = 30 * HZ;
INIT_WORK(&info->tqueue, mxser_do_softint, info);
INIT_WORK(&info->tqueue, mxser_do_softint);
info->normal_termios = mxvar_sdriver->init_termios;
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait);
@ -917,9 +917,10 @@ static int mxser_init(void)
return 0;
}
static void mxser_do_softint(void *private_)
static void mxser_do_softint(struct work_struct *work)
{
struct mxser_struct *info = private_;
struct mxser_struct *info =
container_of(work, struct mxser_struct, tqueue);
struct tty_struct *tty;
tty = info->tty;

View File

@ -421,7 +421,7 @@ static irqreturn_t mgslpc_isr(int irq, void *dev_id);
/*
* Bottom half interrupt handlers
*/
static void bh_handler(void* Context);
static void bh_handler(struct work_struct *work);
static void bh_transmit(MGSLPC_INFO *info);
static void bh_status(MGSLPC_INFO *info);
@ -547,7 +547,7 @@ static int mgslpc_probe(struct pcmcia_device *link)
memset(info, 0, sizeof(MGSLPC_INFO));
info->magic = MGSLPC_MAGIC;
INIT_WORK(&info->task, bh_handler, info);
INIT_WORK(&info->task, bh_handler);
info->max_frame_size = 4096;
info->close_delay = 5*HZ/10;
info->closing_wait = 30*HZ;
@ -842,9 +842,9 @@ static int bh_action(MGSLPC_INFO *info)
return rc;
}
static void bh_handler(void* Context)
static void bh_handler(struct work_struct *work)
{
MGSLPC_INFO *info = (MGSLPC_INFO*)Context;
MGSLPC_INFO *info = container_of(work, MGSLPC_INFO, task);
int action;
if (!info)

View File

@ -765,7 +765,7 @@ static void sonypi_setbluetoothpower(u8 state)
sonypi_device.bluetooth_power = state;
}
static void input_keyrelease(void *data)
static void input_keyrelease(struct work_struct *work)
{
struct sonypi_keypress kp;
@ -1412,7 +1412,7 @@ static int __devinit sonypi_probe(struct platform_device *dev)
goto err_inpdev_unregister;
}
INIT_WORK(&sonypi_device.input_work, input_keyrelease, NULL);
INIT_WORK(&sonypi_device.input_work, input_keyrelease);
}
sonypi_enable(0);

View File

@ -2261,9 +2261,10 @@ static void sx_start(struct tty_struct * tty)
* do_sx_hangup() -> tty->hangup() -> sx_hangup()
*
*/
static void do_sx_hangup(void *private_)
static void do_sx_hangup(struct work_struct *work)
{
struct specialix_port *port = (struct specialix_port *) private_;
struct specialix_port *port =
container_of(work, struct specialix_port, tqueue_hangup);
struct tty_struct *tty;
func_enter();
@ -2336,9 +2337,10 @@ static void sx_set_termios(struct tty_struct * tty, struct termios * old_termios
}
static void do_softint(void *private_)
static void do_softint(struct work_struct *work)
{
struct specialix_port *port = (struct specialix_port *) private_;
struct specialix_port *port =
container_of(work, struct specialix_port, tqueue);
struct tty_struct *tty;
func_enter();
@ -2411,8 +2413,8 @@ static int sx_init_drivers(void)
memset(sx_port, 0, sizeof(sx_port));
for (i = 0; i < SX_NPORT * SX_NBOARD; i++) {
sx_port[i].magic = SPECIALIX_MAGIC;
INIT_WORK(&sx_port[i].tqueue, do_softint, &sx_port[i]);
INIT_WORK(&sx_port[i].tqueue_hangup, do_sx_hangup, &sx_port[i]);
INIT_WORK(&sx_port[i].tqueue, do_softint);
INIT_WORK(&sx_port[i].tqueue_hangup, do_sx_hangup);
sx_port[i].close_delay = 50 * HZ/100;
sx_port[i].closing_wait = 3000 * HZ/100;
init_waitqueue_head(&sx_port[i].open_wait);

View File

@ -802,7 +802,7 @@ static int save_tx_buffer_request(struct mgsl_struct *info,const char *Buffer, u
/*
* Bottom half interrupt handlers
*/
static void mgsl_bh_handler(void* Context);
static void mgsl_bh_handler(struct work_struct *work);
static void mgsl_bh_receive(struct mgsl_struct *info);
static void mgsl_bh_transmit(struct mgsl_struct *info);
static void mgsl_bh_status(struct mgsl_struct *info);
@ -1071,9 +1071,10 @@ static int mgsl_bh_action(struct mgsl_struct *info)
/*
* Perform bottom half processing of work items queued by ISR.
*/
static void mgsl_bh_handler(void* Context)
static void mgsl_bh_handler(struct work_struct *work)
{
struct mgsl_struct *info = (struct mgsl_struct*)Context;
struct mgsl_struct *info =
container_of(work, struct mgsl_struct, task);
int action;
if (!info)
@ -4337,7 +4338,7 @@ static struct mgsl_struct* mgsl_allocate_device(void)
} else {
memset(info, 0, sizeof(struct mgsl_struct));
info->magic = MGSL_MAGIC;
INIT_WORK(&info->task, mgsl_bh_handler, info);
INIT_WORK(&info->task, mgsl_bh_handler);
info->max_frame_size = 4096;
info->close_delay = 5*HZ/10;
info->closing_wait = 30*HZ;

View File

@ -485,7 +485,7 @@ static void enable_loopback(struct slgt_info *info);
static void set_rate(struct slgt_info *info, u32 data_rate);
static int bh_action(struct slgt_info *info);
static void bh_handler(void* context);
static void bh_handler(struct work_struct *work);
static void bh_transmit(struct slgt_info *info);
static void isr_serial(struct slgt_info *info);
static void isr_rdma(struct slgt_info *info);
@ -1878,9 +1878,9 @@ static int bh_action(struct slgt_info *info)
/*
* perform bottom half processing
*/
static void bh_handler(void* context)
static void bh_handler(struct work_struct *work)
{
struct slgt_info *info = context;
struct slgt_info *info = container_of(work, struct slgt_info, task);
int action;
if (!info)
@ -3326,7 +3326,7 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev
} else {
memset(info, 0, sizeof(struct slgt_info));
info->magic = MGSL_MAGIC;
INIT_WORK(&info->task, bh_handler, info);
INIT_WORK(&info->task, bh_handler);
info->max_frame_size = 4096;
info->raw_rx_size = DMABUFSIZE;
info->close_delay = 5*HZ/10;
@ -4799,6 +4799,6 @@ static void rx_timeout(unsigned long context)
spin_lock_irqsave(&info->lock, flags);
info->pending_bh |= BH_RECEIVE;
spin_unlock_irqrestore(&info->lock, flags);
bh_handler(info);
bh_handler(&info->task);
}

View File

@ -602,7 +602,7 @@ static void enable_loopback(SLMP_INFO *info, int enable);
static void set_rate(SLMP_INFO *info, u32 data_rate);
static int bh_action(SLMP_INFO *info);
static void bh_handler(void* Context);
static void bh_handler(struct work_struct *work);
static void bh_receive(SLMP_INFO *info);
static void bh_transmit(SLMP_INFO *info);
static void bh_status(SLMP_INFO *info);
@ -2063,9 +2063,9 @@ int bh_action(SLMP_INFO *info)
/* Perform bottom half processing of work items queued by ISR.
*/
void bh_handler(void* Context)
void bh_handler(struct work_struct *work)
{
SLMP_INFO *info = (SLMP_INFO*)Context;
SLMP_INFO *info = container_of(work, SLMP_INFO, task);
int action;
if (!info)
@ -3805,7 +3805,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev)
} else {
memset(info, 0, sizeof(SLMP_INFO));
info->magic = MGSL_MAGIC;
INIT_WORK(&info->task, bh_handler, info);
INIT_WORK(&info->task, bh_handler);
info->max_frame_size = 4096;
info->close_delay = 5*HZ/10;
info->closing_wait = 30*HZ;

View File

@ -325,9 +325,9 @@ static void user_reader_timeout(unsigned long ptr)
schedule_work(&chip->work);
}
static void timeout_work(void *ptr)
static void timeout_work(struct work_struct *work)
{
struct tpm_chip *chip = ptr;
struct tpm_chip *chip = container_of(work, struct tpm_chip, work);
down(&chip->buffer_mutex);
atomic_set(&chip->data_pending, 0);
@ -1105,7 +1105,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend
init_MUTEX(&chip->tpm_mutex);
INIT_LIST_HEAD(&chip->list);
INIT_WORK(&chip->work, timeout_work, chip);
INIT_WORK(&chip->work, timeout_work);
init_timer(&chip->user_read_timer);
chip->user_read_timer.function = user_reader_timeout;

View File

@ -31,9 +31,11 @@
#include <linux/connector.h>
#include <linux/delay.h>
void cn_queue_wrapper(void *data)
void cn_queue_wrapper(struct work_struct *work)
{
struct cn_callback_data *d = data;
struct cn_callback_entry *cbq =
container_of(work, struct cn_callback_entry, work.work);
struct cn_callback_data *d = &cbq->data;
d->callback(d->callback_priv);
@ -57,7 +59,7 @@ static struct cn_callback_entry *cn_queue_alloc_callback_entry(char *name, struc
memcpy(&cbq->id.id, id, sizeof(struct cb_id));
cbq->data.callback = callback;
INIT_WORK(&cbq->work, &cn_queue_wrapper, &cbq->data);
INIT_DELAYED_WORK(&cbq->work, &cn_queue_wrapper);
return cbq;
}

View File

@ -135,40 +135,39 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v
spin_lock_bh(&dev->cbdev->queue_lock);
list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) {
if (cn_cb_equal(&__cbq->id.id, &msg->id)) {
if (likely(!test_bit(0, &__cbq->work.pending) &&
if (likely(!test_bit(WORK_STRUCT_PENDING,
&__cbq->work.work.management) &&
__cbq->data.ddata == NULL)) {
__cbq->data.callback_priv = msg;
__cbq->data.ddata = data;
__cbq->data.destruct_data = destruct_data;
if (queue_work(dev->cbdev->cn_queue,
&__cbq->work))
if (queue_delayed_work(
dev->cbdev->cn_queue,
&__cbq->work, 0))
err = 0;
} else {
struct work_struct *w;
struct cn_callback_data *d;
w = kzalloc(sizeof(*w) + sizeof(*d), GFP_ATOMIC);
if (w) {
d = (struct cn_callback_data *)(w+1);
__cbq = kzalloc(sizeof(*__cbq), GFP_ATOMIC);
if (__cbq) {
d = &__cbq->data;
d->callback_priv = msg;
d->callback = __cbq->data.callback;
d->ddata = data;
d->destruct_data = destruct_data;
d->free = w;
d->free = __cbq;
INIT_LIST_HEAD(&w->entry);
w->pending = 0;
w->func = &cn_queue_wrapper;
w->data = d;
init_timer(&w->timer);
INIT_DELAYED_WORK(&__cbq->work,
&cn_queue_wrapper);
if (queue_work(dev->cbdev->cn_queue, w))
if (queue_delayed_work(
dev->cbdev->cn_queue,
&__cbq->work, 0))
err = 0;
else {
kfree(w);
kfree(__cbq);
err = -EINVAL;
}
} else

View File

@ -59,7 +59,7 @@ static unsigned int def_sampling_rate;
#define MAX_SAMPLING_DOWN_FACTOR (10)
#define TRANSITION_LATENCY_LIMIT (10 * 1000)
static void do_dbs_timer(void *data);
static void do_dbs_timer(struct work_struct *work);
struct cpu_dbs_info_s {
struct cpufreq_policy *cur_policy;
@ -82,7 +82,7 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */
* is recursive for the same process. -Venki
*/
static DEFINE_MUTEX (dbs_mutex);
static DECLARE_WORK (dbs_work, do_dbs_timer, NULL);
static DECLARE_DELAYED_WORK(dbs_work, do_dbs_timer);
struct dbs_tuners {
unsigned int sampling_rate;
@ -420,7 +420,7 @@ static void dbs_check_cpu(int cpu)
}
}
static void do_dbs_timer(void *data)
static void do_dbs_timer(struct work_struct *work)
{
int i;
lock_cpu_hotplug();
@ -435,7 +435,6 @@ static void do_dbs_timer(void *data)
static inline void dbs_timer_init(void)
{
INIT_WORK(&dbs_work, do_dbs_timer, NULL);
schedule_delayed_work(&dbs_work,
usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
return;

View File

@ -47,13 +47,17 @@ static unsigned int def_sampling_rate;
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
#define TRANSITION_LATENCY_LIMIT (10 * 1000)
static void do_dbs_timer(void *data);
static void do_dbs_timer(struct work_struct *work);
/* Sampling types */
enum dbs_sample {DBS_NORMAL_SAMPLE, DBS_SUB_SAMPLE};
struct cpu_dbs_info_s {
cputime64_t prev_cpu_idle;
cputime64_t prev_cpu_wall;
struct cpufreq_policy *cur_policy;
struct work_struct work;
struct delayed_work work;
enum dbs_sample sample_type;
unsigned int enable;
struct cpufreq_frequency_table *freq_table;
unsigned int freq_lo;
@ -407,30 +411,31 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
}
}
/* Sampling types */
enum {DBS_NORMAL_SAMPLE, DBS_SUB_SAMPLE};
static void do_dbs_timer(void *data)
static void do_dbs_timer(struct work_struct *work)
{
unsigned int cpu = smp_processor_id();
struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu);
enum dbs_sample sample_type = dbs_info->sample_type;
/* We want all CPUs to do sampling nearly on same jiffy */
int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
/* Permit rescheduling of this work item */
work_release(work);
delay -= jiffies % delay;
if (!dbs_info->enable)
return;
/* Common NORMAL_SAMPLE setup */
INIT_WORK(&dbs_info->work, do_dbs_timer, (void *)DBS_NORMAL_SAMPLE);
dbs_info->sample_type = DBS_NORMAL_SAMPLE;
if (!dbs_tuners_ins.powersave_bias ||
(unsigned long) data == DBS_NORMAL_SAMPLE) {
sample_type == DBS_NORMAL_SAMPLE) {
lock_cpu_hotplug();
dbs_check_cpu(dbs_info);
unlock_cpu_hotplug();
if (dbs_info->freq_lo) {
/* Setup timer for SUB_SAMPLE */
INIT_WORK(&dbs_info->work, do_dbs_timer,
(void *)DBS_SUB_SAMPLE);
dbs_info->sample_type = DBS_SUB_SAMPLE;
delay = dbs_info->freq_hi_jiffies;
}
} else {
@ -449,7 +454,8 @@ static inline void dbs_timer_init(unsigned int cpu)
delay -= jiffies % delay;
ondemand_powersave_bias_init();
INIT_WORK(&dbs_info->work, do_dbs_timer, NULL);
INIT_DELAYED_WORK_NAR(&dbs_info->work, do_dbs_timer);
dbs_info->sample_type = DBS_NORMAL_SAMPLE;
queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
}

View File

@ -140,12 +140,14 @@ ulong ds1374_get_rtc_time(void)
return t1;
}
static void ds1374_set_work(void *arg)
static ulong new_time;
static void ds1374_set_work(struct work_struct *work)
{
ulong t1, t2;
int limit = 10; /* arbitrary retry limit */
t1 = *(ulong *) arg;
t1 = new_time;
mutex_lock(&ds1374_mutex);
@ -167,11 +169,9 @@ static void ds1374_set_work(void *arg)
"can't confirm time set from rtc chip\n");
}
static ulong new_time;
static struct workqueue_struct *ds1374_workqueue;
static DECLARE_WORK(ds1374_work, ds1374_set_work, &new_time);
static DECLARE_WORK(ds1374_work, ds1374_set_work);
int ds1374_set_rtc_time(ulong nowtime)
{
@ -180,7 +180,7 @@ int ds1374_set_rtc_time(ulong nowtime)
if (in_interrupt())
queue_work(ds1374_workqueue, &ds1374_work);
else
ds1374_set_work(&new_time);
ds1374_set_work(NULL);
return 0;
}

View File

@ -31,9 +31,10 @@
#include "config_roms.h"
static void delayed_reset_bus(void * __reset_info)
static void delayed_reset_bus(struct work_struct *work)
{
struct hpsb_host *host = (struct hpsb_host*)__reset_info;
struct hpsb_host *host =
container_of(work, struct hpsb_host, delayed_reset.work);
int generation = host->csr.generation + 1;
/* The generation field rolls over to 2 rather than 0 per IEEE
@ -145,7 +146,7 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
atomic_set(&h->generation, 0);
INIT_WORK(&h->delayed_reset, delayed_reset_bus, h);
INIT_DELAYED_WORK(&h->delayed_reset, delayed_reset_bus);
init_timer(&h->timeout);
h->timeout.data = (unsigned long) h;
@ -234,7 +235,7 @@ int hpsb_update_config_rom_image(struct hpsb_host *host)
* Config ROM in the near future. */
reset_delay = HZ;
PREPARE_WORK(&host->delayed_reset, delayed_reset_bus, host);
PREPARE_DELAYED_WORK(&host->delayed_reset, delayed_reset_bus);
schedule_delayed_work(&host->delayed_reset, reset_delay);
return 0;

View File

@ -62,7 +62,7 @@ struct hpsb_host {
struct class_device class_dev;
int update_config_rom;
struct work_struct delayed_reset;
struct delayed_work delayed_reset;
unsigned int config_roms;
struct list_head addr_space;

View File

@ -493,20 +493,25 @@ static void sbp2util_notify_fetch_agent(struct scsi_id_instance_data *scsi_id,
scsi_unblock_requests(scsi_id->scsi_host);
}
static void sbp2util_write_orb_pointer(void *p)
static void sbp2util_write_orb_pointer(struct work_struct *work)
{
struct scsi_id_instance_data *scsi_id =
container_of(work, struct scsi_id_instance_data,
protocol_work.work);
quadlet_t data[2];
data[0] = ORB_SET_NODE_ID(
((struct scsi_id_instance_data *)p)->hi->host->node_id);
data[1] = ((struct scsi_id_instance_data *)p)->last_orb_dma;
data[0] = ORB_SET_NODE_ID(scsi_id->hi->host->node_id);
data[1] = scsi_id->last_orb_dma;
sbp2util_cpu_to_be32_buffer(data, 8);
sbp2util_notify_fetch_agent(p, SBP2_ORB_POINTER_OFFSET, data, 8);
sbp2util_notify_fetch_agent(scsi_id, SBP2_ORB_POINTER_OFFSET, data, 8);
}
static void sbp2util_write_doorbell(void *p)
static void sbp2util_write_doorbell(struct work_struct *work)
{
sbp2util_notify_fetch_agent(p, SBP2_DOORBELL_OFFSET, NULL, 4);
struct scsi_id_instance_data *scsi_id =
container_of(work, struct scsi_id_instance_data,
protocol_work.work);
sbp2util_notify_fetch_agent(scsi_id, SBP2_DOORBELL_OFFSET, NULL, 4);
}
/*
@ -843,7 +848,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
INIT_LIST_HEAD(&scsi_id->scsi_list);
spin_lock_init(&scsi_id->sbp2_command_orb_lock);
atomic_set(&scsi_id->state, SBP2LU_STATE_RUNNING);
INIT_WORK(&scsi_id->protocol_work, NULL, NULL);
INIT_DELAYED_WORK(&scsi_id->protocol_work, NULL);
ud->device.driver_data = scsi_id;
@ -2047,11 +2052,10 @@ static void sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id,
* We do not accept new commands until the job is over.
*/
scsi_block_requests(scsi_id->scsi_host);
PREPARE_WORK(&scsi_id->protocol_work,
PREPARE_DELAYED_WORK(&scsi_id->protocol_work,
last_orb ? sbp2util_write_doorbell:
sbp2util_write_orb_pointer,
scsi_id);
schedule_work(&scsi_id->protocol_work);
sbp2util_write_orb_pointer);
schedule_delayed_work(&scsi_id->protocol_work, 0);
}
}

View File

@ -348,7 +348,7 @@ struct scsi_id_instance_data {
unsigned workarounds;
atomic_t state;
struct work_struct protocol_work;
struct delayed_work protocol_work;
};
/* For use in scsi_id_instance_data.state */

View File

@ -55,11 +55,11 @@ struct addr_req {
int status;
};
static void process_req(void *data);
static void process_req(struct work_struct *work);
static DEFINE_MUTEX(lock);
static LIST_HEAD(req_list);
static DECLARE_WORK(work, process_req, NULL);
static DECLARE_DELAYED_WORK(work, process_req);
static struct workqueue_struct *addr_wq;
void rdma_addr_register_client(struct rdma_addr_client *client)
@ -215,7 +215,7 @@ out:
return ret;
}
static void process_req(void *data)
static void process_req(struct work_struct *work)
{
struct addr_req *req, *temp_req;
struct sockaddr_in *src_in, *dst_in;

View File

@ -285,9 +285,10 @@ err:
kfree(tprops);
}
static void ib_cache_task(void *work_ptr)
static void ib_cache_task(struct work_struct *_work)
{
struct ib_update_work *work = work_ptr;
struct ib_update_work *work =
container_of(_work, struct ib_update_work, work);
ib_cache_update(work->device, work->port_num);
kfree(work);
@ -306,7 +307,7 @@ static void ib_cache_event(struct ib_event_handler *handler,
event->event == IB_EVENT_CLIENT_REREGISTER) {
work = kmalloc(sizeof *work, GFP_ATOMIC);
if (work) {
INIT_WORK(&work->work, ib_cache_task, work);
INIT_WORK(&work->work, ib_cache_task);
work->device = event->device;
work->port_num = event->element.port_num;
schedule_work(&work->work);

View File

@ -101,7 +101,7 @@ struct cm_av {
};
struct cm_work {
struct work_struct work;
struct delayed_work work;
struct list_head list;
struct cm_port *port;
struct ib_mad_recv_wc *mad_recv_wc; /* Received MADs */
@ -161,7 +161,7 @@ struct cm_id_private {
atomic_t work_count;
};
static void cm_work_handler(void *data);
static void cm_work_handler(struct work_struct *work);
static inline void cm_deref_id(struct cm_id_private *cm_id_priv)
{
@ -669,8 +669,7 @@ static struct cm_timewait_info * cm_create_timewait_info(__be32 local_id)
return ERR_PTR(-ENOMEM);
timewait_info->work.local_id = local_id;
INIT_WORK(&timewait_info->work.work, cm_work_handler,
&timewait_info->work);
INIT_DELAYED_WORK(&timewait_info->work.work, cm_work_handler);
timewait_info->work.cm_event.event = IB_CM_TIMEWAIT_EXIT;
return timewait_info;
}
@ -2987,9 +2986,9 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
}
}
static void cm_work_handler(void *data)
static void cm_work_handler(struct work_struct *_work)
{
struct cm_work *work = data;
struct cm_work *work = container_of(_work, struct cm_work, work.work);
int ret;
switch (work->cm_event.event) {
@ -3079,12 +3078,12 @@ int ib_cm_establish(struct ib_cm_id *cm_id)
* we need to find the cm_id once we're in the context of the
* worker thread, rather than holding a reference on it.
*/
INIT_WORK(&work->work, cm_work_handler, work);
INIT_DELAYED_WORK(&work->work, cm_work_handler);
work->local_id = cm_id->local_id;
work->remote_id = cm_id->remote_id;
work->mad_recv_wc = NULL;
work->cm_event.event = IB_CM_USER_ESTABLISHED;
queue_work(cm.wq, &work->work);
queue_delayed_work(cm.wq, &work->work, 0);
out:
return ret;
}
@ -3146,11 +3145,11 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
return;
}
INIT_WORK(&work->work, cm_work_handler, work);
INIT_DELAYED_WORK(&work->work, cm_work_handler);
work->cm_event.event = event;
work->mad_recv_wc = mad_recv_wc;
work->port = (struct cm_port *)mad_agent->context;
queue_work(cm.wq, &work->work);
queue_delayed_work(cm.wq, &work->work, 0);
}
static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv,

View File

@ -1341,9 +1341,9 @@ static int cma_query_ib_route(struct rdma_id_private *id_priv, int timeout_ms,
return (id_priv->query_id < 0) ? id_priv->query_id : 0;
}
static void cma_work_handler(void *data)
static void cma_work_handler(struct work_struct *_work)
{
struct cma_work *work = data;
struct cma_work *work = container_of(_work, struct cma_work, work);
struct rdma_id_private *id_priv = work->id;
int destroy = 0;
@ -1374,7 +1374,7 @@ static int cma_resolve_ib_route(struct rdma_id_private *id_priv, int timeout_ms)
return -ENOMEM;
work->id = id_priv;
INIT_WORK(&work->work, cma_work_handler, work);
INIT_WORK(&work->work, cma_work_handler);
work->old_state = CMA_ROUTE_QUERY;
work->new_state = CMA_ROUTE_RESOLVED;
work->event.event = RDMA_CM_EVENT_ROUTE_RESOLVED;
@ -1431,7 +1431,7 @@ static int cma_resolve_iw_route(struct rdma_id_private *id_priv, int timeout_ms)
return -ENOMEM;
work->id = id_priv;
INIT_WORK(&work->work, cma_work_handler, work);
INIT_WORK(&work->work, cma_work_handler);
work->old_state = CMA_ROUTE_QUERY;
work->new_state = CMA_ROUTE_RESOLVED;
work->event.event = RDMA_CM_EVENT_ROUTE_RESOLVED;
@ -1585,7 +1585,7 @@ static int cma_resolve_loopback(struct rdma_id_private *id_priv)
}
work->id = id_priv;
INIT_WORK(&work->work, cma_work_handler, work);
INIT_WORK(&work->work, cma_work_handler);
work->old_state = CMA_ADDR_QUERY;
work->new_state = CMA_ADDR_RESOLVED;
work->event.event = RDMA_CM_EVENT_ADDR_RESOLVED;

View File

@ -828,9 +828,10 @@ static int process_event(struct iwcm_id_private *cm_id_priv,
* thread asleep on the destroy_comp list vs. an object destroyed
* here synchronously when the last reference is removed.
*/
static void cm_work_handler(void *arg)
static void cm_work_handler(struct work_struct *_work)
{
struct iwcm_work *work = arg, lwork;
struct iwcm_work lwork, *work =
container_of(_work, struct iwcm_work, work);
struct iwcm_id_private *cm_id_priv = work->cm_id;
unsigned long flags;
int empty;
@ -899,7 +900,7 @@ static int cm_event_handler(struct iw_cm_id *cm_id,
goto out;
}
INIT_WORK(&work->work, cm_work_handler, work);
INIT_WORK(&work->work, cm_work_handler);
work->cm_id = cm_id_priv;
work->event = *iw_event;

View File

@ -65,8 +65,8 @@ static struct ib_mad_agent_private *find_mad_agent(
static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
struct ib_mad_private *mad);
static void cancel_mads(struct ib_mad_agent_private *mad_agent_priv);
static void timeout_sends(void *data);
static void local_completions(void *data);
static void timeout_sends(struct work_struct *work);
static void local_completions(struct work_struct *work);
static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req,
struct ib_mad_agent_private *agent_priv,
u8 mgmt_class);
@ -356,10 +356,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
INIT_LIST_HEAD(&mad_agent_priv->wait_list);
INIT_LIST_HEAD(&mad_agent_priv->done_list);
INIT_LIST_HEAD(&mad_agent_priv->rmpp_list);
INIT_WORK(&mad_agent_priv->timed_work, timeout_sends, mad_agent_priv);
INIT_DELAYED_WORK(&mad_agent_priv->timed_work, timeout_sends);
INIT_LIST_HEAD(&mad_agent_priv->local_list);
INIT_WORK(&mad_agent_priv->local_work, local_completions,
mad_agent_priv);
INIT_WORK(&mad_agent_priv->local_work, local_completions);
atomic_set(&mad_agent_priv->refcount, 1);
init_completion(&mad_agent_priv->comp);
@ -2198,12 +2197,12 @@ static void mad_error_handler(struct ib_mad_port_private *port_priv,
/*
* IB MAD completion callback
*/
static void ib_mad_completion_handler(void *data)
static void ib_mad_completion_handler(struct work_struct *work)
{
struct ib_mad_port_private *port_priv;
struct ib_wc wc;
port_priv = (struct ib_mad_port_private *)data;
port_priv = container_of(work, struct ib_mad_port_private, work);
ib_req_notify_cq(port_priv->cq, IB_CQ_NEXT_COMP);
while (ib_poll_cq(port_priv->cq, 1, &wc) == 1) {
@ -2324,7 +2323,7 @@ void ib_cancel_mad(struct ib_mad_agent *mad_agent,
}
EXPORT_SYMBOL(ib_cancel_mad);
static void local_completions(void *data)
static void local_completions(struct work_struct *work)
{
struct ib_mad_agent_private *mad_agent_priv;
struct ib_mad_local_private *local;
@ -2334,7 +2333,8 @@ static void local_completions(void *data)
struct ib_wc wc;
struct ib_mad_send_wc mad_send_wc;
mad_agent_priv = (struct ib_mad_agent_private *)data;
mad_agent_priv =
container_of(work, struct ib_mad_agent_private, local_work);
spin_lock_irqsave(&mad_agent_priv->lock, flags);
while (!list_empty(&mad_agent_priv->local_list)) {
@ -2434,14 +2434,15 @@ static int retry_send(struct ib_mad_send_wr_private *mad_send_wr)
return ret;
}
static void timeout_sends(void *data)
static void timeout_sends(struct work_struct *work)
{
struct ib_mad_agent_private *mad_agent_priv;
struct ib_mad_send_wr_private *mad_send_wr;
struct ib_mad_send_wc mad_send_wc;
unsigned long flags, delay;
mad_agent_priv = (struct ib_mad_agent_private *)data;
mad_agent_priv = container_of(work, struct ib_mad_agent_private,
timed_work.work);
mad_send_wc.vendor_err = 0;
spin_lock_irqsave(&mad_agent_priv->lock, flags);
@ -2799,7 +2800,7 @@ static int ib_mad_port_open(struct ib_device *device,
ret = -ENOMEM;
goto error8;
}
INIT_WORK(&port_priv->work, ib_mad_completion_handler, port_priv);
INIT_WORK(&port_priv->work, ib_mad_completion_handler);
spin_lock_irqsave(&ib_mad_port_list_lock, flags);
list_add_tail(&port_priv->port_list, &ib_mad_port_list);

View File

@ -102,7 +102,7 @@ struct ib_mad_agent_private {
struct list_head send_list;
struct list_head wait_list;
struct list_head done_list;
struct work_struct timed_work;
struct delayed_work timed_work;
unsigned long timeout;
struct list_head local_list;
struct work_struct local_work;

View File

@ -45,8 +45,8 @@ enum rmpp_state {
struct mad_rmpp_recv {
struct ib_mad_agent_private *agent;
struct list_head list;
struct work_struct timeout_work;
struct work_struct cleanup_work;
struct delayed_work timeout_work;
struct delayed_work cleanup_work;
struct completion comp;
enum rmpp_state state;
spinlock_t lock;
@ -233,9 +233,10 @@ static void nack_recv(struct ib_mad_agent_private *agent,
}
}
static void recv_timeout_handler(void *data)
static void recv_timeout_handler(struct work_struct *work)
{
struct mad_rmpp_recv *rmpp_recv = data;
struct mad_rmpp_recv *rmpp_recv =
container_of(work, struct mad_rmpp_recv, timeout_work.work);
struct ib_mad_recv_wc *rmpp_wc;
unsigned long flags;
@ -254,9 +255,10 @@ static void recv_timeout_handler(void *data)
ib_free_recv_mad(rmpp_wc);
}
static void recv_cleanup_handler(void *data)
static void recv_cleanup_handler(struct work_struct *work)
{
struct mad_rmpp_recv *rmpp_recv = data;
struct mad_rmpp_recv *rmpp_recv =
container_of(work, struct mad_rmpp_recv, cleanup_work.work);
unsigned long flags;
spin_lock_irqsave(&rmpp_recv->agent->lock, flags);
@ -285,8 +287,8 @@ create_rmpp_recv(struct ib_mad_agent_private *agent,
rmpp_recv->agent = agent;
init_completion(&rmpp_recv->comp);
INIT_WORK(&rmpp_recv->timeout_work, recv_timeout_handler, rmpp_recv);
INIT_WORK(&rmpp_recv->cleanup_work, recv_cleanup_handler, rmpp_recv);
INIT_DELAYED_WORK(&rmpp_recv->timeout_work, recv_timeout_handler);
INIT_DELAYED_WORK(&rmpp_recv->cleanup_work, recv_cleanup_handler);
spin_lock_init(&rmpp_recv->lock);
rmpp_recv->state = RMPP_STATE_ACTIVE;
atomic_set(&rmpp_recv->refcount, 1);

View File

@ -360,9 +360,10 @@ static void free_sm_ah(struct kref *kref)
kfree(sm_ah);
}
static void update_sm_ah(void *port_ptr)
static void update_sm_ah(struct work_struct *work)
{
struct ib_sa_port *port = port_ptr;
struct ib_sa_port *port =
container_of(work, struct ib_sa_port, update_task);
struct ib_sa_sm_ah *new_ah, *old_ah;
struct ib_port_attr port_attr;
struct ib_ah_attr ah_attr;
@ -992,8 +993,7 @@ static void ib_sa_add_one(struct ib_device *device)
if (IS_ERR(sa_dev->port[i].agent))
goto err;
INIT_WORK(&sa_dev->port[i].update_task,
update_sm_ah, &sa_dev->port[i]);
INIT_WORK(&sa_dev->port[i].update_task, update_sm_ah);
}
ib_set_client_data(device, &sa_client, sa_dev);
@ -1010,7 +1010,7 @@ static void ib_sa_add_one(struct ib_device *device)
goto err;
for (i = 0; i <= e - s; ++i)
update_sm_ah(&sa_dev->port[i]);
update_sm_ah(&sa_dev->port[i].update_task);
return;

View File

@ -179,9 +179,10 @@ void ib_umem_release(struct ib_device *dev, struct ib_umem *umem)
up_write(&current->mm->mmap_sem);
}
static void ib_umem_account(void *work_ptr)
static void ib_umem_account(struct work_struct *_work)
{
struct ib_umem_account_work *work = work_ptr;
struct ib_umem_account_work *work =
container_of(_work, struct ib_umem_account_work, work);
down_write(&work->mm->mmap_sem);
work->mm->locked_vm -= work->diff;
@ -216,7 +217,7 @@ void ib_umem_release_on_close(struct ib_device *dev, struct ib_umem *umem)
return;
}
INIT_WORK(&work->work, ib_umem_account, work);
INIT_WORK(&work->work, ib_umem_account);
work->mm = mm;
work->diff = PAGE_ALIGN(umem->length + umem->offset) >> PAGE_SHIFT;

View File

@ -214,9 +214,10 @@ struct ipath_user_pages_work {
unsigned long num_pages;
};
static void user_pages_account(void *ptr)
static void user_pages_account(struct work_struct *_work)
{
struct ipath_user_pages_work *work = ptr;
struct ipath_user_pages_work *work =
container_of(_work, struct ipath_user_pages_work, work);
down_write(&work->mm->mmap_sem);
work->mm->locked_vm -= work->num_pages;
@ -242,7 +243,7 @@ void ipath_release_user_pages_on_close(struct page **p, size_t num_pages)
goto bail;
INIT_WORK(&work->work, user_pages_account, work);
INIT_WORK(&work->work, user_pages_account);
work->mm = mm;
work->num_pages = num_pages;

View File

@ -57,7 +57,7 @@ static int catas_reset_disable;
module_param_named(catas_reset_disable, catas_reset_disable, int, 0644);
MODULE_PARM_DESC(catas_reset_disable, "disable reset on catastrophic event if nonzero");
static void catas_reset(void *work_ptr)
static void catas_reset(struct work_struct *work)
{
struct mthca_dev *dev, *tmpdev;
LIST_HEAD(tlist);
@ -203,7 +203,7 @@ void mthca_stop_catas_poll(struct mthca_dev *dev)
int __init mthca_catas_init(void)
{
INIT_WORK(&catas_work, catas_reset, NULL);
INIT_WORK(&catas_work, catas_reset);
catas_wq = create_singlethread_workqueue("mthca_catas");
if (!catas_wq)

View File

@ -136,11 +136,11 @@ struct ipoib_dev_priv {
struct list_head multicast_list;
struct rb_root multicast_tree;
struct work_struct pkey_task;
struct work_struct mcast_task;
struct delayed_work pkey_task;
struct delayed_work mcast_task;
struct work_struct flush_task;
struct work_struct restart_task;
struct work_struct ah_reap_task;
struct delayed_work ah_reap_task;
struct ib_device *ca;
u8 port;
@ -254,13 +254,13 @@ int ipoib_add_pkey_attr(struct net_device *dev);
void ipoib_send(struct net_device *dev, struct sk_buff *skb,
struct ipoib_ah *address, u32 qpn);
void ipoib_reap_ah(void *dev_ptr);
void ipoib_reap_ah(struct work_struct *work);
void ipoib_flush_paths(struct net_device *dev);
struct ipoib_dev_priv *ipoib_intf_alloc(const char *format);
int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
void ipoib_ib_dev_flush(void *dev);
void ipoib_ib_dev_flush(struct work_struct *work);
void ipoib_ib_dev_cleanup(struct net_device *dev);
int ipoib_ib_dev_open(struct net_device *dev);
@ -271,10 +271,10 @@ int ipoib_ib_dev_stop(struct net_device *dev);
int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
void ipoib_dev_cleanup(struct net_device *dev);
void ipoib_mcast_join_task(void *dev_ptr);
void ipoib_mcast_join_task(struct work_struct *work);
void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb);
void ipoib_mcast_restart_task(void *dev_ptr);
void ipoib_mcast_restart_task(struct work_struct *work);
int ipoib_mcast_start_thread(struct net_device *dev);
int ipoib_mcast_stop_thread(struct net_device *dev, int flush);
@ -312,7 +312,7 @@ void ipoib_event(struct ib_event_handler *handler,
int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey);
int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey);
void ipoib_pkey_poll(void *dev);
void ipoib_pkey_poll(struct work_struct *work);
int ipoib_pkey_dev_delay_open(struct net_device *dev);
#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG

View File

@ -400,10 +400,11 @@ static void __ipoib_reap_ah(struct net_device *dev)
spin_unlock_irq(&priv->tx_lock);
}
void ipoib_reap_ah(void *dev_ptr)
void ipoib_reap_ah(struct work_struct *work)
{
struct net_device *dev = dev_ptr;
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_dev_priv *priv =
container_of(work, struct ipoib_dev_priv, ah_reap_task.work);
struct net_device *dev = priv->dev;
__ipoib_reap_ah(dev);
@ -613,10 +614,11 @@ int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
return 0;
}
void ipoib_ib_dev_flush(void *_dev)
void ipoib_ib_dev_flush(struct work_struct *work)
{
struct net_device *dev = (struct net_device *)_dev;
struct ipoib_dev_priv *priv = netdev_priv(dev), *cpriv;
struct ipoib_dev_priv *cpriv, *priv =
container_of(work, struct ipoib_dev_priv, flush_task);
struct net_device *dev = priv->dev;
if (!test_bit(IPOIB_FLAG_INITIALIZED, &priv->flags) ) {
ipoib_dbg(priv, "Not flushing - IPOIB_FLAG_INITIALIZED not set.\n");
@ -638,14 +640,14 @@ void ipoib_ib_dev_flush(void *_dev)
*/
if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) {
ipoib_ib_dev_up(dev);
ipoib_mcast_restart_task(dev);
ipoib_mcast_restart_task(&priv->restart_task);
}
mutex_lock(&priv->vlan_mutex);
/* Flush any child interfaces too */
list_for_each_entry(cpriv, &priv->child_intfs, list)
ipoib_ib_dev_flush(cpriv->dev);
ipoib_ib_dev_flush(&cpriv->flush_task);
mutex_unlock(&priv->vlan_mutex);
}
@ -672,10 +674,11 @@ void ipoib_ib_dev_cleanup(struct net_device *dev)
* change async notification is available.
*/
void ipoib_pkey_poll(void *dev_ptr)
void ipoib_pkey_poll(struct work_struct *work)
{
struct net_device *dev = dev_ptr;
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_dev_priv *priv =
container_of(work, struct ipoib_dev_priv, pkey_task.work);
struct net_device *dev = priv->dev;
ipoib_pkey_dev_check_presence(dev);

View File

@ -933,11 +933,11 @@ static void ipoib_setup(struct net_device *dev)
INIT_LIST_HEAD(&priv->dead_ahs);
INIT_LIST_HEAD(&priv->multicast_list);
INIT_WORK(&priv->pkey_task, ipoib_pkey_poll, priv->dev);
INIT_WORK(&priv->mcast_task, ipoib_mcast_join_task, priv->dev);
INIT_WORK(&priv->flush_task, ipoib_ib_dev_flush, priv->dev);
INIT_WORK(&priv->restart_task, ipoib_mcast_restart_task, priv->dev);
INIT_WORK(&priv->ah_reap_task, ipoib_reap_ah, priv->dev);
INIT_DELAYED_WORK(&priv->pkey_task, ipoib_pkey_poll);
INIT_DELAYED_WORK(&priv->mcast_task, ipoib_mcast_join_task);
INIT_WORK(&priv->flush_task, ipoib_ib_dev_flush);
INIT_WORK(&priv->restart_task, ipoib_mcast_restart_task);
INIT_DELAYED_WORK(&priv->ah_reap_task, ipoib_reap_ah);
}
struct ipoib_dev_priv *ipoib_intf_alloc(const char *name)

View File

@ -399,7 +399,8 @@ static void ipoib_mcast_join_complete(int status,
mcast->backoff = 1;
mutex_lock(&mcast_mutex);
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
queue_work(ipoib_workqueue, &priv->mcast_task);
queue_delayed_work(ipoib_workqueue,
&priv->mcast_task, 0);
mutex_unlock(&mcast_mutex);
complete(&mcast->done);
return;
@ -435,7 +436,8 @@ static void ipoib_mcast_join_complete(int status,
if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) {
if (status == -ETIMEDOUT)
queue_work(ipoib_workqueue, &priv->mcast_task);
queue_delayed_work(ipoib_workqueue, &priv->mcast_task,
0);
else
queue_delayed_work(ipoib_workqueue, &priv->mcast_task,
mcast->backoff * HZ);
@ -517,10 +519,11 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
mcast->query_id = ret;
}
void ipoib_mcast_join_task(void *dev_ptr)
void ipoib_mcast_join_task(struct work_struct *work)
{
struct net_device *dev = dev_ptr;
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_dev_priv *priv =
container_of(work, struct ipoib_dev_priv, mcast_task.work);
struct net_device *dev = priv->dev;
if (!test_bit(IPOIB_MCAST_RUN, &priv->flags))
return;
@ -610,7 +613,7 @@ int ipoib_mcast_start_thread(struct net_device *dev)
mutex_lock(&mcast_mutex);
if (!test_and_set_bit(IPOIB_MCAST_RUN, &priv->flags))
queue_work(ipoib_workqueue, &priv->mcast_task);
queue_delayed_work(ipoib_workqueue, &priv->mcast_task, 0);
mutex_unlock(&mcast_mutex);
spin_lock_irq(&priv->lock);
@ -818,10 +821,11 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
}
}
void ipoib_mcast_restart_task(void *dev_ptr)
void ipoib_mcast_restart_task(struct work_struct *work)
{
struct net_device *dev = dev_ptr;
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_dev_priv *priv =
container_of(work, struct ipoib_dev_priv, restart_task);
struct net_device *dev = priv->dev;
struct dev_mc_list *mclist;
struct ipoib_mcast *mcast, *tmcast;
LIST_HEAD(remove_list);

View File

@ -48,7 +48,7 @@
static void iser_cq_tasklet_fn(unsigned long data);
static void iser_cq_callback(struct ib_cq *cq, void *cq_context);
static void iser_comp_error_worker(void *data);
static void iser_comp_error_worker(struct work_struct *work);
static void iser_cq_event_callback(struct ib_event *cause, void *context)
{
@ -480,8 +480,7 @@ int iser_conn_init(struct iser_conn **ibconn)
init_waitqueue_head(&ib_conn->wait);
atomic_set(&ib_conn->post_recv_buf_count, 0);
atomic_set(&ib_conn->post_send_buf_count, 0);
INIT_WORK(&ib_conn->comperror_work, iser_comp_error_worker,
ib_conn);
INIT_WORK(&ib_conn->comperror_work, iser_comp_error_worker);
INIT_LIST_HEAD(&ib_conn->conn_list);
spin_lock_init(&ib_conn->lock);
@ -754,9 +753,10 @@ int iser_post_send(struct iser_desc *tx_desc)
return ret_val;
}
static void iser_comp_error_worker(void *data)
static void iser_comp_error_worker(struct work_struct *work)
{
struct iser_conn *ib_conn = data;
struct iser_conn *ib_conn =
container_of(work, struct iser_conn, comperror_work);
/* getting here when the state is UP means that the conn is being *
* terminated asynchronously from the iSCSI layer's perspective. */

View File

@ -390,9 +390,10 @@ static void srp_disconnect_target(struct srp_target_port *target)
wait_for_completion(&target->done);
}
static void srp_remove_work(void *target_ptr)
static void srp_remove_work(struct work_struct *work)
{
struct srp_target_port *target = target_ptr;
struct srp_target_port *target =
container_of(work, struct srp_target_port, work);
spin_lock_irq(target->scsi_host->host_lock);
if (target->state != SRP_TARGET_DEAD) {
@ -575,7 +576,7 @@ err:
spin_lock_irq(target->scsi_host->host_lock);
if (target->state == SRP_TARGET_CONNECTING) {
target->state = SRP_TARGET_DEAD;
INIT_WORK(&target->work, srp_remove_work, target);
INIT_WORK(&target->work, srp_remove_work);
schedule_work(&target->work);
}
spin_unlock_irq(target->scsi_host->host_lock);

View File

@ -572,9 +572,9 @@ lkkbd_event (struct input_dev *dev, unsigned int type, unsigned int code,
* were in.
*/
static void
lkkbd_reinit (void *data)
lkkbd_reinit (struct work_struct *work)
{
struct lkkbd *lk = data;
struct lkkbd *lk = container_of(work, struct lkkbd, tq);
int division;
unsigned char leds_on = 0;
unsigned char leds_off = 0;
@ -651,7 +651,7 @@ lkkbd_connect (struct serio *serio, struct serio_driver *drv)
lk->serio = serio;
lk->dev = input_dev;
INIT_WORK (&lk->tq, lkkbd_reinit, lk);
INIT_WORK (&lk->tq, lkkbd_reinit);
lk->bell_volume = bell_volume;
lk->keyclick_volume = keyclick_volume;
lk->ctrlclick_volume = ctrlclick_volume;

View File

@ -208,9 +208,9 @@ static int sunkbd_initialize(struct sunkbd *sunkbd)
* were in.
*/
static void sunkbd_reinit(void *data)
static void sunkbd_reinit(struct work_struct *work)
{
struct sunkbd *sunkbd = data;
struct sunkbd *sunkbd = container_of(work, struct sunkbd, tq);
wait_event_interruptible_timeout(sunkbd->wait, sunkbd->reset >= 0, HZ);
@ -248,7 +248,7 @@ static int sunkbd_connect(struct serio *serio, struct serio_driver *drv)
sunkbd->serio = serio;
sunkbd->dev = input_dev;
init_waitqueue_head(&sunkbd->wait);
INIT_WORK(&sunkbd->tq, sunkbd_reinit, sunkbd);
INIT_WORK(&sunkbd->tq, sunkbd_reinit);
snprintf(sunkbd->phys, sizeof(sunkbd->phys), "%s/input0", serio->phys);
serio_set_drvdata(serio, sunkbd);

View File

@ -888,9 +888,10 @@ static int psmouse_poll(struct psmouse *psmouse)
* psmouse_resync() attempts to re-validate current protocol.
*/
static void psmouse_resync(void *p)
static void psmouse_resync(struct work_struct *work)
{
struct psmouse *psmouse = p, *parent = NULL;
struct psmouse *parent = NULL, *psmouse =
container_of(work, struct psmouse, resync_work);
struct serio *serio = psmouse->ps2dev.serio;
psmouse_ret_t rc = PSMOUSE_GOOD_DATA;
int failed = 0, enabled = 0;
@ -1121,7 +1122,7 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
goto out;
ps2_init(&psmouse->ps2dev, serio);
INIT_WORK(&psmouse->resync_work, psmouse_resync, psmouse);
INIT_WORK(&psmouse->resync_work, psmouse_resync);
psmouse->dev = input_dev;
snprintf(psmouse->phys, sizeof(psmouse->phys), "%s/input0", serio->phys);

View File

@ -627,8 +627,10 @@ handle_ack(act2000_card *card, act2000_chan *chan, __u8 blocknr) {
}
void
actcapi_dispatch(act2000_card *card)
actcapi_dispatch(struct work_struct *work)
{
struct act2000_card *card =
container_of(work, struct act2000_card, rcv_tq);
struct sk_buff *skb;
actcapi_msg *msg;
__u16 ccmd;

View File

@ -356,7 +356,7 @@ extern int actcapi_connect_req(act2000_card *, act2000_chan *, char *, char, int
extern void actcapi_select_b2_protocol_req(act2000_card *, act2000_chan *);
extern void actcapi_disconnect_b3_req(act2000_card *, act2000_chan *);
extern void actcapi_connect_resp(act2000_card *, act2000_chan *, __u8);
extern void actcapi_dispatch(act2000_card *);
extern void actcapi_dispatch(struct work_struct *);
#ifdef DEBUG_MSG
extern void actcapi_debug_msg(struct sk_buff *skb, int);
#else

View File

@ -192,8 +192,11 @@ act2000_set_msn(act2000_card *card, char *eazmsn)
}
static void
act2000_transmit(struct act2000_card *card)
act2000_transmit(struct work_struct *work)
{
struct act2000_card *card =
container_of(work, struct act2000_card, snd_tq);
switch (card->bus) {
case ACT2000_BUS_ISA:
act2000_isa_send(card);
@ -207,8 +210,11 @@ act2000_transmit(struct act2000_card *card)
}
static void
act2000_receive(struct act2000_card *card)
act2000_receive(struct work_struct *work)
{
struct act2000_card *card =
container_of(work, struct act2000_card, poll_tq);
switch (card->bus) {
case ACT2000_BUS_ISA:
act2000_isa_receive(card);
@ -227,7 +233,7 @@ act2000_poll(unsigned long data)
act2000_card * card = (act2000_card *)data;
unsigned long flags;
act2000_receive(card);
act2000_receive(&card->poll_tq);
spin_lock_irqsave(&card->lock, flags);
mod_timer(&card->ptimer, jiffies+3);
spin_unlock_irqrestore(&card->lock, flags);
@ -578,9 +584,9 @@ act2000_alloccard(int bus, int port, int irq, char *id)
skb_queue_head_init(&card->sndq);
skb_queue_head_init(&card->rcvq);
skb_queue_head_init(&card->ackq);
INIT_WORK(&card->snd_tq, (void *) (void *) act2000_transmit, card);
INIT_WORK(&card->rcv_tq, (void *) (void *) actcapi_dispatch, card);
INIT_WORK(&card->poll_tq, (void *) (void *) act2000_receive, card);
INIT_WORK(&card->snd_tq, act2000_transmit);
INIT_WORK(&card->rcv_tq, actcapi_dispatch);
INIT_WORK(&card->poll_tq, act2000_receive);
init_timer(&card->ptimer);
card->interface.owner = THIS_MODULE;
card->interface.channels = ACT2000_BCH;

View File

@ -208,9 +208,10 @@ static void notify_down(u32 contr)
}
}
static void notify_handler(void *data)
static void notify_handler(struct work_struct *work)
{
struct capi_notifier *np = data;
struct capi_notifier *np =
container_of(work, struct capi_notifier, work);
switch (np->cmd) {
case KCI_CONTRUP:
@ -235,7 +236,7 @@ static int notify_push(unsigned int cmd, u32 controller, u16 applid, u32 ncci)
if (!np)
return -ENOMEM;
INIT_WORK(&np->work, notify_handler, np);
INIT_WORK(&np->work, notify_handler);
np->cmd = cmd;
np->controller = controller;
np->applid = applid;
@ -248,10 +249,11 @@ static int notify_push(unsigned int cmd, u32 controller, u16 applid, u32 ncci)
/* -------- Receiver ------------------------------------------ */
static void recv_handler(void *_ap)
static void recv_handler(struct work_struct *work)
{
struct sk_buff *skb;
struct capi20_appl *ap = (struct capi20_appl *) _ap;
struct capi20_appl *ap =
container_of(work, struct capi20_appl, recv_work);
if ((!ap) || (ap->release_in_progress))
return;
@ -527,7 +529,7 @@ u16 capi20_register(struct capi20_appl *ap)
ap->callback = NULL;
init_MUTEX(&ap->recv_sem);
skb_queue_head_init(&ap->recv_queue);
INIT_WORK(&ap->recv_work, recv_handler, (void *)ap);
INIT_WORK(&ap->recv_work, recv_handler);
ap->release_in_progress = 0;
write_unlock_irqrestore(&application_lock, flags);

View File

@ -232,9 +232,10 @@ Amd7930_new_ph(struct IsdnCardState *cs)
static void
Amd7930_bh(struct IsdnCardState *cs)
Amd7930_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
struct PStack *stptr;
if (!cs)
@ -789,7 +790,7 @@ Amd7930_init(struct IsdnCardState *cs)
void __devinit
setup_Amd7930(struct IsdnCardState *cs)
{
INIT_WORK(&cs->tqueue, (void *)(void *) Amd7930_bh, cs);
INIT_WORK(&cs->tqueue, Amd7930_bh);
cs->dbusytimer.function = (void *) dbusy_timer_handler;
cs->dbusytimer.data = (long) cs;
init_timer(&cs->dbusytimer);

View File

@ -1137,7 +1137,6 @@ static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockow
cs->tx_skb = NULL;
cs->tx_cnt = 0;
cs->event = 0;
cs->tqueue.data = cs;
skb_queue_head_init(&cs->rq);
skb_queue_head_init(&cs->sq);
@ -1554,7 +1553,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg);
static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg);
static int hisax_bc_setstack(struct PStack *st, struct BCState *bcs);
static void hisax_bc_close(struct BCState *bcs);
static void hisax_bh(struct IsdnCardState *cs);
static void hisax_bh(struct work_struct *work);
static void EChannel_proc_rcv(struct hisax_d_if *d_if);
int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[],
@ -1586,7 +1585,7 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[],
hisax_d_if->cs = cs;
cs->hw.hisax_d_if = hisax_d_if;
cs->cardmsg = hisax_cardmsg;
INIT_WORK(&cs->tqueue, (void *)(void *)hisax_bh, cs);
INIT_WORK(&cs->tqueue, hisax_bh);
cs->channel[0].d_st->l2.l2l1 = hisax_d_l2l1;
for (i = 0; i < 2; i++) {
cs->bcs[i].BC_SetStack = hisax_bc_setstack;
@ -1618,8 +1617,10 @@ static void hisax_sched_event(struct IsdnCardState *cs, int event)
schedule_work(&cs->tqueue);
}
static void hisax_bh(struct IsdnCardState *cs)
static void hisax_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
struct PStack *st;
int pr;

View File

@ -1083,8 +1083,9 @@ tx_b_frame(struct hfc4s8s_btype *bch)
/* bottom half handler for interrupt */
/*************************************/
static void
hfc4s8s_bh(hfc4s8s_hw * hw)
hfc4s8s_bh(struct work_struct *work)
{
hfc4s8s_hw *hw = container_of(work, hfc4s8s_hw, tqueue);
u_char b;
struct hfc4s8s_l1 *l1p;
volatile u_char *fifo_stat;
@ -1550,7 +1551,7 @@ setup_instance(hfc4s8s_hw * hw)
goto out;
}
INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw);
INIT_WORK(&hw->tqueue, hfc4s8s_bh);
if (request_irq
(hw->irq, hfc4s8s_interrupt, IRQF_SHARED, hw->card_name, hw)) {

View File

@ -549,10 +549,11 @@ setstack_2b(struct PStack *st, struct BCState *bcs)
}
static void
hfcd_bh(struct IsdnCardState *cs)
hfcd_bh(struct work_struct *work)
{
if (!cs)
return;
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
if (test_and_clear_bit(D_L1STATECHANGE, &cs->event)) {
switch (cs->dc.hfcd.ph_state) {
case (0):
@ -1072,5 +1073,5 @@ set_cs_func(struct IsdnCardState *cs)
cs->dbusytimer.function = (void *) hfc_dbusy_timer;
cs->dbusytimer.data = (long) cs;
init_timer(&cs->dbusytimer);
INIT_WORK(&cs->tqueue, (void *)(void *) hfcd_bh, cs);
INIT_WORK(&cs->tqueue, hfcd_bh);
}

View File

@ -1506,8 +1506,10 @@ setstack_2b(struct PStack *st, struct BCState *bcs)
/* handle L1 state changes */
/***************************/
static void
hfcpci_bh(struct IsdnCardState *cs)
hfcpci_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
u_long flags;
// struct PStack *stptr;
@ -1722,7 +1724,7 @@ setup_hfcpci(struct IsdnCard *card)
Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2);
/* At this point the needed PCI config is done */
/* fifos are still not enabled */
INIT_WORK(&cs->tqueue, (void *)(void *) hfcpci_bh, cs);
INIT_WORK(&cs->tqueue, hfcpci_bh);
cs->setstack_d = setstack_hfcpci;
cs->BC_Send_Data = &hfcpci_send_data;
cs->readisac = NULL;

View File

@ -1251,8 +1251,10 @@ setstack_2b(struct PStack *st, struct BCState *bcs)
/* handle L1 state changes */
/***************************/
static void
hfcsx_bh(struct IsdnCardState *cs)
hfcsx_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
u_long flags;
if (!cs)
@ -1499,7 +1501,7 @@ setup_hfcsx(struct IsdnCard *card)
cs->dbusytimer.function = (void *) hfcsx_dbusy_timer;
cs->dbusytimer.data = (long) cs;
init_timer(&cs->dbusytimer);
INIT_WORK(&cs->tqueue, (void *)(void *) hfcsx_bh, cs);
INIT_WORK(&cs->tqueue, hfcsx_bh);
cs->readisac = NULL;
cs->writeisac = NULL;
cs->readisacfifo = NULL;

View File

@ -77,8 +77,10 @@ icc_new_ph(struct IsdnCardState *cs)
}
static void
icc_bh(struct IsdnCardState *cs)
icc_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
struct PStack *stptr;
if (!cs)
@ -674,7 +676,7 @@ clear_pending_icc_ints(struct IsdnCardState *cs)
void __devinit
setup_icc(struct IsdnCardState *cs)
{
INIT_WORK(&cs->tqueue, (void *)(void *) icc_bh, cs);
INIT_WORK(&cs->tqueue, icc_bh);
cs->dbusytimer.function = (void *) dbusy_timer_handler;
cs->dbusytimer.data = (long) cs;
init_timer(&cs->dbusytimer);

View File

@ -81,8 +81,10 @@ isac_new_ph(struct IsdnCardState *cs)
}
static void
isac_bh(struct IsdnCardState *cs)
isac_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
struct PStack *stptr;
if (!cs)
@ -674,7 +676,7 @@ clear_pending_isac_ints(struct IsdnCardState *cs)
void __devinit
setup_isac(struct IsdnCardState *cs)
{
INIT_WORK(&cs->tqueue, (void *)(void *) isac_bh, cs);
INIT_WORK(&cs->tqueue, isac_bh);
cs->dbusytimer.function = (void *) dbusy_timer_handler;
cs->dbusytimer.data = (long) cs;
init_timer(&cs->dbusytimer);

View File

@ -437,8 +437,10 @@ extern void BChannel_bh(struct BCState *);
#define B_LL_OK 10
static void
isar_bh(struct BCState *bcs)
isar_bh(struct work_struct *work)
{
struct BCState *bcs = container_of(work, struct BCState, tqueue);
BChannel_bh(bcs);
if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event))
ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR);
@ -1580,7 +1582,7 @@ isar_setup(struct IsdnCardState *cs)
cs->bcs[i].mode = 0;
cs->bcs[i].hw.isar.dpath = i + 1;
modeisar(&cs->bcs[i], 0, 0);
INIT_WORK(&cs->bcs[i].tqueue, (void *)(void *) isar_bh, &cs->bcs[i]);
INIT_WORK(&cs->bcs[i].tqueue, isar_bh);
}
}

View File

@ -315,8 +315,10 @@ BChannel_proc_ack(struct BCState *bcs)
}
void
BChannel_bh(struct BCState *bcs)
BChannel_bh(struct work_struct *work)
{
struct BCState *bcs = container_of(work, struct BCState, tqueue);
if (!bcs)
return;
if (test_and_clear_bit(B_RCVBUFREADY, &bcs->event))
@ -362,7 +364,7 @@ init_bcstate(struct IsdnCardState *cs, int bc)
bcs->cs = cs;
bcs->channel = bc;
INIT_WORK(&bcs->tqueue, (void *)(void *) BChannel_bh, bcs);
INIT_WORK(&bcs->tqueue, BChannel_bh);
spin_lock_init(&bcs->aclock);
bcs->BC_SetStack = NULL;
bcs->BC_Close = NULL;

View File

@ -101,8 +101,10 @@ W6692_new_ph(struct IsdnCardState *cs)
}
static void
W6692_bh(struct IsdnCardState *cs)
W6692_bh(struct work_struct *work)
{
struct IsdnCardState *cs =
container_of(work, struct IsdnCardState, tqueue);
struct PStack *stptr;
if (!cs)
@ -1070,7 +1072,7 @@ setup_w6692(struct IsdnCard *card)
id_list[cs->subtyp].card_name, cs->irq,
cs->hw.w6692.iobase);
INIT_WORK(&cs->tqueue, (void *)(void *) W6692_bh, cs);
INIT_WORK(&cs->tqueue, W6692_bh);
cs->readW6692 = &ReadW6692;
cs->writeW6692 = &WriteW6692;
cs->readisacfifo = &ReadISACfifo;

View File

@ -984,9 +984,9 @@ void isdn_net_write_super(isdn_net_local *lp, struct sk_buff *skb)
/*
* called from tq_immediate
*/
static void isdn_net_softint(void *private)
static void isdn_net_softint(struct work_struct *work)
{
isdn_net_local *lp = private;
isdn_net_local *lp = container_of(work, isdn_net_local, tqueue);
struct sk_buff *skb;
spin_lock_bh(&lp->xmit_lock);
@ -2596,7 +2596,7 @@ isdn_net_new(char *name, struct net_device *master)
netdev->local->netdev = netdev;
netdev->local->next = netdev->local;
INIT_WORK(&netdev->local->tqueue, (void *)(void *) isdn_net_softint, netdev->local);
INIT_WORK(&netdev->local->tqueue, isdn_net_softint);
spin_lock_init(&netdev->local->xmit_lock);
netdev->local->isdn_device = -1;

View File

@ -68,8 +68,6 @@ static void pcbit_set_msn(struct pcbit_dev *dev, char *list);
static int pcbit_check_msn(struct pcbit_dev *dev, char *msn);
extern void pcbit_deliver(void * data);
int pcbit_init_dev(int board, int mem_base, int irq)
{
struct pcbit_dev *dev;
@ -129,7 +127,7 @@ int pcbit_init_dev(int board, int mem_base, int irq)
memset(dev->b2, 0, sizeof(struct pcbit_chan));
dev->b2->id = 1;
INIT_WORK(&dev->qdelivery, pcbit_deliver, dev);
INIT_WORK(&dev->qdelivery, pcbit_deliver);
/*
* interrupts

View File

@ -67,7 +67,6 @@ extern void pcbit_l3_receive(struct pcbit_dev *dev, ulong msg,
* Prototypes
*/
void pcbit_deliver(void *data);
static void pcbit_transmit(struct pcbit_dev *dev);
static void pcbit_recv_ack(struct pcbit_dev *dev, unsigned char ack);
@ -299,11 +298,12 @@ pcbit_transmit(struct pcbit_dev *dev)
*/
void
pcbit_deliver(void *data)
pcbit_deliver(struct work_struct *work)
{
struct frame_buf *frame;
unsigned long flags, msg;
struct pcbit_dev *dev = (struct pcbit_dev *) data;
struct pcbit_dev *dev =
container_of(work, struct pcbit_dev, qdelivery);
spin_lock_irqsave(&dev->lock, flags);

View File

@ -166,4 +166,6 @@ struct pcbit_ioctl {
#define L2_RUNNING 5
#define L2_ERROR 6
extern void pcbit_deliver(struct work_struct *work);
#endif

View File

@ -600,7 +600,7 @@ core_initcall(smu_late_init);
* sysfs visibility
*/
static void smu_expose_childs(void *unused)
static void smu_expose_childs(struct work_struct *unused)
{
struct device_node *np;
@ -610,7 +610,7 @@ static void smu_expose_childs(void *unused)
&smu->of_dev->dev);
}
static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs, NULL);
static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs);
static int smu_platform_probe(struct of_device* dev,
const struct of_device_id *match)

View File

@ -458,11 +458,11 @@ static void dec_pending(struct crypt_io *io, int error)
* interrupt context.
*/
static struct workqueue_struct *_kcryptd_workqueue;
static void kcryptd_do_work(void *data);
static void kcryptd_do_work(struct work_struct *work);
static void kcryptd_queue_io(struct crypt_io *io)
{
INIT_WORK(&io->work, kcryptd_do_work, io);
INIT_WORK(&io->work, kcryptd_do_work);
queue_work(_kcryptd_workqueue, &io->work);
}
@ -618,9 +618,9 @@ static void process_read_endio(struct crypt_io *io)
dec_pending(io, crypt_convert(cc, &ctx));
}
static void kcryptd_do_work(void *data)
static void kcryptd_do_work(struct work_struct *work)
{
struct crypt_io *io = data;
struct crypt_io *io = container_of(work, struct crypt_io, work);
if (io->post_process)
process_read_endio(io);

View File

@ -104,8 +104,8 @@ typedef int (*action_fn) (struct pgpath *pgpath);
static kmem_cache_t *_mpio_cache;
struct workqueue_struct *kmultipathd;
static void process_queued_ios(void *data);
static void trigger_event(void *data);
static void process_queued_ios(struct work_struct *work);
static void trigger_event(struct work_struct *work);
/*-----------------------------------------------
@ -173,8 +173,8 @@ static struct multipath *alloc_multipath(struct dm_target *ti)
INIT_LIST_HEAD(&m->priority_groups);
spin_lock_init(&m->lock);
m->queue_io = 1;
INIT_WORK(&m->process_queued_ios, process_queued_ios, m);
INIT_WORK(&m->trigger_event, trigger_event, m);
INIT_WORK(&m->process_queued_ios, process_queued_ios);
INIT_WORK(&m->trigger_event, trigger_event);
m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache);
if (!m->mpio_pool) {
kfree(m);
@ -379,9 +379,10 @@ static void dispatch_queued_ios(struct multipath *m)
}
}
static void process_queued_ios(void *data)
static void process_queued_ios(struct work_struct *work)
{
struct multipath *m = (struct multipath *) data;
struct multipath *m =
container_of(work, struct multipath, process_queued_ios);
struct hw_handler *hwh = &m->hw_handler;
struct pgpath *pgpath = NULL;
unsigned init_required = 0, must_queue = 1;
@ -421,9 +422,10 @@ out:
* An event is triggered whenever a path is taken out of use.
* Includes path failure and PG bypass.
*/
static void trigger_event(void *data)
static void trigger_event(struct work_struct *work)
{
struct multipath *m = (struct multipath *) data;
struct multipath *m =
container_of(work, struct multipath, trigger_event);
dm_table_event(m->ti->table);
}

View File

@ -883,7 +883,7 @@ static void do_mirror(struct mirror_set *ms)
do_writes(ms, &writes);
}
static void do_work(void *ignored)
static void do_work(struct work_struct *ignored)
{
struct mirror_set *ms;
@ -1269,7 +1269,7 @@ static int __init dm_mirror_init(void)
dm_dirty_log_exit();
return r;
}
INIT_WORK(&_kmirrord_work, do_work, NULL);
INIT_WORK(&_kmirrord_work, do_work);
r = dm_register_target(&mirror_target);
if (r < 0) {

View File

@ -40,7 +40,7 @@
#define SNAPSHOT_PAGES 256
struct workqueue_struct *ksnapd;
static void flush_queued_bios(void *data);
static void flush_queued_bios(struct work_struct *work);
struct pending_exception {
struct exception e;
@ -528,7 +528,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}
bio_list_init(&s->queued_bios);
INIT_WORK(&s->queued_bios_work, flush_queued_bios, s);
INIT_WORK(&s->queued_bios_work, flush_queued_bios);
/* Add snapshot to the list of snapshots for this origin */
/* Exceptions aren't triggered till snapshot_resume() is called */
@ -603,9 +603,10 @@ static void flush_bios(struct bio *bio)
}
}
static void flush_queued_bios(void *data)
static void flush_queued_bios(struct work_struct *work)
{
struct dm_snapshot *s = (struct dm_snapshot *) data;
struct dm_snapshot *s =
container_of(work, struct dm_snapshot, queued_bios_work);
struct bio *queued_bios;
unsigned long flags;

View File

@ -417,7 +417,7 @@ static int process_jobs(struct list_head *jobs, int (*fn) (struct kcopyd_job *))
/*
* kcopyd does this every time it's woken up.
*/
static void do_work(void *ignored)
static void do_work(struct work_struct *ignored)
{
/*
* The order that these are called is *very* important.
@ -628,7 +628,7 @@ static int kcopyd_init(void)
}
kcopyd_clients++;
INIT_WORK(&_kcopyd_work, do_work, NULL);
INIT_WORK(&_kcopyd_work, do_work);
mutex_unlock(&kcopyd_init_lock);
return 0;
}

View File

@ -63,7 +63,7 @@ struct flexcop_pci {
unsigned long last_irq;
struct work_struct irq_check_work;
struct delayed_work irq_check_work;
struct flexcop_device *fc_dev;
};
@ -97,9 +97,10 @@ static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_regi
return 0;
}
static void flexcop_pci_irq_check_work(void *data)
static void flexcop_pci_irq_check_work(struct work_struct *work)
{
struct flexcop_pci *fc_pci = data;
struct flexcop_pci *fc_pci =
container_of(work, struct flexcop_pci, irq_check_work.work);
struct flexcop_device *fc = fc_pci->fc_dev;
flexcop_ibi_value v = fc->read_ibi_reg(fc,sram_dest_reg_714);
@ -371,7 +372,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
if ((ret = flexcop_pci_dma_init(fc_pci)) != 0)
goto err_fc_exit;
INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci);
INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work);
return ret;

View File

@ -127,7 +127,7 @@ struct cinergyt2 {
struct dvbt_set_parameters_msg param;
struct dvbt_get_status_msg status;
struct work_struct query_work;
struct delayed_work query_work;
wait_queue_head_t poll_wq;
int pending_fe_events;
@ -141,7 +141,7 @@ struct cinergyt2 {
#ifdef ENABLE_RC
struct input_dev *rc_input_dev;
char phys[64];
struct work_struct rc_query_work;
struct delayed_work rc_query_work;
int rc_input_event;
u32 rc_last_code;
unsigned long last_event_jiffies;
@ -724,9 +724,10 @@ static struct dvb_device cinergyt2_fe_template = {
#ifdef ENABLE_RC
static void cinergyt2_query_rc (void *data)
static void cinergyt2_query_rc (struct work_struct *work)
{
struct cinergyt2 *cinergyt2 = data;
struct cinergyt2 *cinergyt2 =
container_of(work, struct cinergyt2, rc_query_work.work);
char buf[1] = { CINERGYT2_EP1_GET_RC_EVENTS };
struct cinergyt2_rc_event rc_events[12];
int n, len, i;
@ -807,7 +808,7 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys));
cinergyt2->rc_input_event = KEY_MAX;
cinergyt2->rc_last_code = ~0;
INIT_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc, cinergyt2);
INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc);
input_dev->name = DRIVER_NAME " remote control";
input_dev->phys = cinergyt2->phys;
@ -848,9 +849,10 @@ static inline void cinergyt2_resume_rc(struct cinergyt2 *cinergyt2) { }
#endif /* ENABLE_RC */
static void cinergyt2_query (void *data)
static void cinergyt2_query (struct work_struct *work)
{
struct cinergyt2 *cinergyt2 = (struct cinergyt2 *) data;
struct cinergyt2 *cinergyt2 =
container_of(work, struct cinergyt2, query_work.work);
char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS };
struct dvbt_get_status_msg *s = &cinergyt2->status;
uint8_t lock_bits;
@ -894,7 +896,7 @@ static int cinergyt2_probe (struct usb_interface *intf,
mutex_init(&cinergyt2->sem);
init_waitqueue_head (&cinergyt2->poll_wq);
INIT_WORK(&cinergyt2->query_work, cinergyt2_query, cinergyt2);
INIT_DELAYED_WORK(&cinergyt2->query_work, cinergyt2_query);
cinergyt2->udev = interface_to_usbdev(intf);
cinergyt2->param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;

View File

@ -127,6 +127,7 @@ struct dvb_net_priv {
int in_use;
struct net_device_stats stats;
u16 pid;
struct net_device *net;
struct dvb_net *host;
struct dmx_demux *demux;
struct dmx_section_feed *secfeed;
@ -1123,10 +1124,11 @@ static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc)
}
static void wq_set_multicast_list (void *data)
static void wq_set_multicast_list (struct work_struct *work)
{
struct net_device *dev = data;
struct dvb_net_priv *priv = dev->priv;
struct dvb_net_priv *priv =
container_of(work, struct dvb_net_priv, set_multicast_list_wq);
struct net_device *dev = priv->net;
dvb_net_feed_stop(dev);
priv->rx_mode = RX_MODE_UNI;
@ -1167,9 +1169,11 @@ static void dvb_net_set_multicast_list (struct net_device *dev)
}
static void wq_restart_net_feed (void *data)
static void wq_restart_net_feed (struct work_struct *work)
{
struct net_device *dev = data;
struct dvb_net_priv *priv =
container_of(work, struct dvb_net_priv, restart_net_feed_wq);
struct net_device *dev = priv->net;
if (netif_running(dev)) {
dvb_net_feed_stop(dev);
@ -1276,6 +1280,7 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
dvbnet->device[if_num] = net;
priv = net->priv;
priv->net = net;
priv->demux = dvbnet->demux;
priv->pid = pid;
priv->rx_mode = RX_MODE_UNI;
@ -1284,8 +1289,8 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
priv->feedtype = feedtype;
reset_ule(priv);
INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list, net);
INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed, net);
INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list);
INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed);
mutex_init(&priv->mutex);
net->base_addr = pid;

View File

@ -13,9 +13,10 @@
*
* TODO: Fix the repeat rate of the input device.
*/
static void dvb_usb_read_remote_control(void *data)
static void dvb_usb_read_remote_control(struct work_struct *work)
{
struct dvb_usb_device *d = data;
struct dvb_usb_device *d =
container_of(work, struct dvb_usb_device, rc_query_work.work);
u32 event;
int state;
@ -128,7 +129,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
input_register_device(d->rc_input_dev);
INIT_WORK(&d->rc_query_work, dvb_usb_read_remote_control, d);
INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control);
info("schedule remote query interval to %d msecs.", d->props.rc_interval);
schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval));

View File

@ -369,7 +369,7 @@ struct dvb_usb_device {
/* remote control */
struct input_dev *rc_input_dev;
char rc_phys[64];
struct work_struct rc_query_work;
struct delayed_work rc_query_work;
u32 last_event;
int last_state;

View File

@ -82,6 +82,8 @@ struct pp_cam_entry {
struct pardevice *pdev;
struct parport *port;
struct work_struct cb_task;
void (*cb_func)(void *cbdata);
void *cb_data;
int open_count;
wait_queue_head_t wq_stream;
/* image state flags */
@ -130,6 +132,20 @@ static void cpia_parport_disable_irq( struct parport *port ) {
#define PARPORT_CHUNK_SIZE PAGE_SIZE
static void cpia_pp_run_callback(struct work_struct *work)
{
void (*cb_func)(void *cbdata);
void *cb_data;
struct pp_cam_entry *cam;
cam = container_of(work, struct pp_cam_entry, cb_task);
cb_func = cam->cb_func;
cb_data = cam->cb_data;
work_release(work);
cb_func(cb_data);
}
/****************************************************************************
*
* CPiA-specific low-level parport functions for nibble uploads
@ -664,7 +680,9 @@ static int cpia_pp_registerCallback(void *privdata, void (*cb)(void *cbdata), vo
int retval = 0;
if(cam->port->irq != PARPORT_IRQ_NONE) {
INIT_WORK(&cam->cb_task, cb, cbdata);
cam->cb_func = cb;
cam->cb_data = cbdata;
INIT_WORK_NAR(&cam->cb_task, cpia_pp_run_callback);
} else {
retval = -1;
}

View File

@ -145,9 +145,9 @@ static void ir_timer(unsigned long data)
schedule_work(&ir->work);
}
static void cx88_ir_work(void *data)
static void cx88_ir_work(struct work_struct *work)
{
struct cx88_IR *ir = data;
struct cx88_IR *ir = container_of(work, struct cx88_IR, work);
unsigned long timeout;
cx88_ir_handle_key(ir);
@ -308,7 +308,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
core->ir = ir;
if (ir->polling) {
INIT_WORK(&ir->work, cx88_ir_work, ir);
INIT_WORK(&ir->work, cx88_ir_work);
init_timer(&ir->timer);
ir->timer.function = ir_timer;
ir->timer.data = (unsigned long)ir;

View File

@ -268,9 +268,9 @@ static void ir_timer(unsigned long data)
schedule_work(&ir->work);
}
static void ir_work(void *data)
static void ir_work(struct work_struct *work)
{
struct IR_i2c *ir = data;
struct IR_i2c *ir = container_of(work, struct IR_i2c, work);
ir_key_poll(ir);
mod_timer(&ir->timer, jiffies+HZ/10);
}
@ -400,7 +400,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
ir->input->name,ir->input->phys,adap->name);
/* start polling via eventd */
INIT_WORK(&ir->work, ir_work, ir);
INIT_WORK(&ir->work, ir_work);
init_timer(&ir->timer);
ir->timer.function = ir_timer;
ir->timer.data = (unsigned long)ir;

View File

@ -45,16 +45,21 @@ static void pvr2_context_trigger_poll(struct pvr2_context *mp)
}
static void pvr2_context_poll(struct pvr2_context *mp)
static void pvr2_context_poll(struct work_struct *work)
{
struct pvr2_context *mp =
container_of(work, struct pvr2_context, workpoll);
pvr2_context_enter(mp); do {
pvr2_hdw_poll(mp->hdw);
} while (0); pvr2_context_exit(mp);
}
static void pvr2_context_setup(struct pvr2_context *mp)
static void pvr2_context_setup(struct work_struct *work)
{
struct pvr2_context *mp =
container_of(work, struct pvr2_context, workinit);
pvr2_context_enter(mp); do {
if (!pvr2_hdw_dev_ok(mp->hdw)) break;
pvr2_hdw_setup(mp->hdw);
@ -92,8 +97,8 @@ struct pvr2_context *pvr2_context_create(
}
mp->workqueue = create_singlethread_workqueue("pvrusb2");
INIT_WORK(&mp->workinit,(void (*)(void*))pvr2_context_setup,mp);
INIT_WORK(&mp->workpoll,(void (*)(void*))pvr2_context_poll,mp);
INIT_WORK(&mp->workinit, pvr2_context_setup);
INIT_WORK(&mp->workpoll, pvr2_context_poll);
queue_work(mp->workqueue,&mp->workinit);
done:
return mp;

View File

@ -322,9 +322,9 @@ static void saa6588_timer(unsigned long data)
schedule_work(&s->work);
}
static void saa6588_work(void *data)
static void saa6588_work(struct work_struct *work)
{
struct saa6588 *s = (struct saa6588 *)data;
struct saa6588 *s = container_of(work, struct saa6588, work);
saa6588_i2c_poll(s);
mod_timer(&s->timer, jiffies + msecs_to_jiffies(20));
@ -417,7 +417,7 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind)
saa6588_configure(s);
/* start polling via eventd */
INIT_WORK(&s->work, saa6588_work, s);
INIT_WORK(&s->work, saa6588_work);
init_timer(&s->timer);
s->timer.function = saa6588_timer;
s->timer.data = (unsigned long)s;

View File

@ -343,9 +343,10 @@ static struct video_device saa7134_empress_template =
.minor = -1,
};
static void empress_signal_update(void* data)
static void empress_signal_update(struct work_struct *work)
{
struct saa7134_dev* dev = (struct saa7134_dev*) data;
struct saa7134_dev* dev =
container_of(work, struct saa7134_dev, empress_workqueue);
if (dev->nosignal) {
dprintk("no video signal\n");
@ -378,7 +379,7 @@ static int empress_init(struct saa7134_dev *dev)
"%s empress (%s)", dev->name,
saa7134_boards[dev->board].name);
INIT_WORK(&dev->empress_workqueue, empress_signal_update, (void*) dev);
INIT_WORK(&dev->empress_workqueue, empress_signal_update);
err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER,
empress_nr[dev->nr]);
@ -399,7 +400,7 @@ static int empress_init(struct saa7134_dev *dev)
sizeof(struct saa7134_buf),
dev);
empress_signal_update(dev);
empress_signal_update(&dev->empress_workqueue);
return 0;
}

View File

@ -1018,9 +1018,10 @@ mptfc_init_host_attr(MPT_ADAPTER *ioc,int portnum)
}
static void
mptfc_setup_reset(void *arg)
mptfc_setup_reset(struct work_struct *work)
{
MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg;
MPT_ADAPTER *ioc =
container_of(work, MPT_ADAPTER, fc_setup_reset_work);
u64 pn;
struct mptfc_rport_info *ri;
@ -1043,9 +1044,10 @@ mptfc_setup_reset(void *arg)
}
static void
mptfc_rescan_devices(void *arg)
mptfc_rescan_devices(struct work_struct *work)
{
MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg;
MPT_ADAPTER *ioc =
container_of(work, MPT_ADAPTER, fc_rescan_work);
int ii;
u64 pn;
struct mptfc_rport_info *ri;
@ -1154,8 +1156,8 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
spin_lock_init(&ioc->fc_rescan_work_lock);
INIT_WORK(&ioc->fc_rescan_work, mptfc_rescan_devices,(void *)ioc);
INIT_WORK(&ioc->fc_setup_reset_work, mptfc_setup_reset, (void *)ioc);
INIT_WORK(&ioc->fc_rescan_work, mptfc_rescan_devices);
INIT_WORK(&ioc->fc_setup_reset_work, mptfc_setup_reset);
spin_lock_irqsave(&ioc->FreeQlock, flags);

View File

@ -111,7 +111,8 @@ struct mpt_lan_priv {
u32 total_received;
struct net_device_stats stats; /* Per device statistics */
struct work_struct post_buckets_task;
struct delayed_work post_buckets_task;
struct net_device *dev;
unsigned long post_buckets_active;
};
@ -132,7 +133,7 @@ static int lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf,
static int mpt_lan_open(struct net_device *dev);
static int mpt_lan_reset(struct net_device *dev);
static int mpt_lan_close(struct net_device *dev);
static void mpt_lan_post_receive_buckets(void *dev_id);
static void mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv);
static void mpt_lan_wake_post_buckets_task(struct net_device *dev,
int priority);
static int mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg);
@ -345,7 +346,7 @@ mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
priv->mpt_rxfidx[++priv->mpt_rxfidx_tail] = i;
spin_unlock_irqrestore(&priv->rxfidx_lock, flags);
} else {
mpt_lan_post_receive_buckets(dev);
mpt_lan_post_receive_buckets(priv);
netif_wake_queue(dev);
}
@ -441,7 +442,7 @@ mpt_lan_open(struct net_device *dev)
dlprintk((KERN_INFO MYNAM "/lo: Finished initializing RcvCtl\n"));
mpt_lan_post_receive_buckets(dev);
mpt_lan_post_receive_buckets(priv);
printk(KERN_INFO MYNAM ": %s/%s: interface up & active\n",
IOC_AND_NETDEV_NAMES_s_s(dev));
@ -854,7 +855,7 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
if (test_and_set_bit(0, &priv->post_buckets_active) == 0) {
if (priority) {
schedule_work(&priv->post_buckets_task);
schedule_delayed_work(&priv->post_buckets_task, 0);
} else {
schedule_delayed_work(&priv->post_buckets_task, 1);
dioprintk((KERN_INFO MYNAM ": post_buckets queued on "
@ -1188,10 +1189,9 @@ mpt_lan_receive_post_reply(struct net_device *dev,
/* Simple SGE's only at the moment */
static void
mpt_lan_post_receive_buckets(void *dev_id)
mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
{
struct net_device *dev = dev_id;
struct mpt_lan_priv *priv = dev->priv;
struct net_device *dev = priv->dev;
MPT_ADAPTER *mpt_dev = priv->mpt_dev;
MPT_FRAME_HDR *mf;
LANReceivePostRequest_t *pRecvReq;
@ -1335,6 +1335,13 @@ out:
clear_bit(0, &priv->post_buckets_active);
}
static void
mpt_lan_post_receive_buckets_work(struct work_struct *work)
{
mpt_lan_post_receive_buckets(container_of(work, struct mpt_lan_priv,
post_buckets_task.work));
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static struct net_device *
mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
@ -1350,11 +1357,13 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
priv = netdev_priv(dev);
priv->dev = dev;
priv->mpt_dev = mpt_dev;
priv->pnum = pnum;
memset(&priv->post_buckets_task, 0, sizeof(struct work_struct));
INIT_WORK(&priv->post_buckets_task, mpt_lan_post_receive_buckets, dev);
memset(&priv->post_buckets_task, 0, sizeof(priv->post_buckets_task));
INIT_DELAYED_WORK(&priv->post_buckets_task,
mpt_lan_post_receive_buckets_work);
priv->post_buckets_active = 0;
dlprintk((KERN_INFO MYNAM "@%d: bucketlen = %d\n",

View File

@ -2006,9 +2006,10 @@ __mptsas_discovery_work(MPT_ADAPTER *ioc)
*(Mutex LOCKED)
*/
static void
mptsas_discovery_work(void * arg)
mptsas_discovery_work(struct work_struct *work)
{
struct mptsas_discovery_event *ev = arg;
struct mptsas_discovery_event *ev =
container_of(work, struct mptsas_discovery_event, work);
MPT_ADAPTER *ioc = ev->ioc;
mutex_lock(&ioc->sas_discovery_mutex);
@ -2068,9 +2069,9 @@ mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u32 id)
* Work queue thread to clear the persitency table
*/
static void
mptsas_persist_clear_table(void * arg)
mptsas_persist_clear_table(struct work_struct *work)
{
MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg;
MPT_ADAPTER *ioc = container_of(work, MPT_ADAPTER, sas_persist_task);
mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
}
@ -2093,9 +2094,10 @@ mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
* Work queue thread to handle SAS hotplug events
*/
static void
mptsas_hotplug_work(void *arg)
mptsas_hotplug_work(struct work_struct *work)
{
struct mptsas_hotplug_event *ev = arg;
struct mptsas_hotplug_event *ev =
container_of(work, struct mptsas_hotplug_event, work);
MPT_ADAPTER *ioc = ev->ioc;
struct mptsas_phyinfo *phy_info;
struct sas_rphy *rphy;
@ -2341,7 +2343,7 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc,
break;
}
INIT_WORK(&ev->work, mptsas_hotplug_work, ev);
INIT_WORK(&ev->work, mptsas_hotplug_work);
ev->ioc = ioc;
ev->handle = le16_to_cpu(sas_event_data->DevHandle);
ev->parent_handle =
@ -2366,7 +2368,7 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc,
* Persistent table is full.
*/
INIT_WORK(&ioc->sas_persist_task,
mptsas_persist_clear_table, (void *)ioc);
mptsas_persist_clear_table);
schedule_work(&ioc->sas_persist_task);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
@ -2395,7 +2397,7 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc,
return;
}
INIT_WORK(&ev->work, mptsas_hotplug_work, ev);
INIT_WORK(&ev->work, mptsas_hotplug_work);
ev->ioc = ioc;
ev->id = raid_event_data->VolumeID;
ev->event_type = MPTSAS_IGNORE_EVENT;
@ -2474,7 +2476,7 @@ mptsas_send_discovery_event(MPT_ADAPTER *ioc,
ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
if (!ev)
return;
INIT_WORK(&ev->work, mptsas_discovery_work, ev);
INIT_WORK(&ev->work, mptsas_discovery_work);
ev->ioc = ioc;
schedule_work(&ev->work);
};
@ -2511,8 +2513,7 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
break;
case MPI_EVENT_PERSISTENT_TABLE_FULL:
INIT_WORK(&ioc->sas_persist_task,
mptsas_persist_clear_table,
(void *)ioc);
mptsas_persist_clear_table);
schedule_work(&ioc->sas_persist_task);
break;
case MPI_EVENT_SAS_DISCOVERY:

Some files were not shown because too many files have changed in this diff Show More