WorkStruct: make allyesconfig

Fix up for make allyesconfig.

Signed-Off-By: David Howells <[email protected]>
This commit is contained in:
David Howells 2006-11-22 14:57:56 +00:00
commit c4028958b6
282 changed files with 1771 additions and 1450 deletions

View file

@ -59,10 +59,10 @@ struct gpio_methods {
};
struct gpio_notification {
struct delayed_work work;
notify_func_t notify;
void *data;
void *gpio_private;
struct work_struct work;
struct mutex mutex;
};

View file

@ -195,9 +195,10 @@ static void ftr_gpio_all_amps_restore(struct gpio_runtime *rt)
ftr_gpio_set_lineout(rt, (s>>2)&1);
}
static void ftr_handle_notify(void *data)
static void ftr_handle_notify(struct work_struct *work)
{
struct gpio_notification *notif = data;
struct gpio_notification *notif =
container_of(work, struct gpio_notification, work.work);
mutex_lock(&notif->mutex);
if (notif->notify)
@ -253,12 +254,9 @@ static void ftr_gpio_init(struct gpio_runtime *rt)
ftr_gpio_all_amps_off(rt);
rt->implementation_private = 0;
INIT_WORK(&rt->headphone_notify.work, ftr_handle_notify,
&rt->headphone_notify);
INIT_WORK(&rt->line_in_notify.work, ftr_handle_notify,
&rt->line_in_notify);
INIT_WORK(&rt->line_out_notify.work, ftr_handle_notify,
&rt->line_out_notify);
INIT_DELAYED_WORK(&rt->headphone_notify.work, ftr_handle_notify);
INIT_DELAYED_WORK(&rt->line_in_notify.work, ftr_handle_notify);
INIT_DELAYED_WORK(&rt->line_out_notify.work, ftr_handle_notify);
mutex_init(&rt->headphone_notify.mutex);
mutex_init(&rt->line_in_notify.mutex);
mutex_init(&rt->line_out_notify.mutex);
@ -287,7 +285,7 @@ static irqreturn_t ftr_handle_notify_irq(int xx, void *data)
{
struct gpio_notification *notif = data;
schedule_work(&notif->work);
schedule_delayed_work(&notif->work, 0);
return IRQ_HANDLED;
}

View file

@ -69,9 +69,10 @@ static void pmf_gpio_all_amps_restore(struct gpio_runtime *rt)
pmf_gpio_set_lineout(rt, (s>>2)&1);
}
static void pmf_handle_notify(void *data)
static void pmf_handle_notify(struct work_struct *work)
{
struct gpio_notification *notif = data;
struct gpio_notification *notif =
container_of(work, struct gpio_notification, work.work);
mutex_lock(&notif->mutex);
if (notif->notify)
@ -83,12 +84,9 @@ static void pmf_gpio_init(struct gpio_runtime *rt)
{
pmf_gpio_all_amps_off(rt);
rt->implementation_private = 0;
INIT_WORK(&rt->headphone_notify.work, pmf_handle_notify,
&rt->headphone_notify);
INIT_WORK(&rt->line_in_notify.work, pmf_handle_notify,
&rt->line_in_notify);
INIT_WORK(&rt->line_out_notify.work, pmf_handle_notify,
&rt->line_out_notify);
INIT_DELAYED_WORK(&rt->headphone_notify.work, pmf_handle_notify);
INIT_DELAYED_WORK(&rt->line_in_notify.work, pmf_handle_notify);
INIT_DELAYED_WORK(&rt->line_out_notify.work, pmf_handle_notify);
mutex_init(&rt->headphone_notify.mutex);
mutex_init(&rt->line_in_notify.mutex);
mutex_init(&rt->line_out_notify.mutex);
@ -129,7 +127,7 @@ static void pmf_handle_notify_irq(void *data)
{
struct gpio_notification *notif = data;
schedule_work(&notif->work);
schedule_delayed_work(&notif->work, 0);
}
static int pmf_set_notify(struct gpio_runtime *rt,

View file

@ -35,7 +35,7 @@ MODULE_LICENSE("GPL");
#define AK4114_ADDR 0x00 /* fixed address */
static void ak4114_stats(void *);
static void ak4114_stats(struct work_struct *work);
static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val)
{
@ -158,7 +158,7 @@ void snd_ak4114_reinit(struct ak4114 *chip)
reg_write(chip, AK4114_REG_PWRDN, old | AK4114_RST | AK4114_PWN);
/* bring up statistics / event queing */
chip->init = 0;
INIT_WORK(&chip->work, ak4114_stats, chip);
INIT_DELAYED_WORK(&chip->work, ak4114_stats);
queue_delayed_work(chip->workqueue, &chip->work, HZ / 10);
}
@ -561,9 +561,9 @@ int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags)
return res;
}
static void ak4114_stats(void *data)
static void ak4114_stats(struct work_struct *work)
{
struct ak4114 *chip = (struct ak4114 *)data;
struct ak4114 *chip = container_of(work, struct ak4114, work.work);
if (chip->init)
return;

View file

@ -1927,9 +1927,10 @@ static int snd_ac97_dev_disconnect(struct snd_device *device)
static struct snd_ac97_build_ops null_build_ops;
#ifdef CONFIG_SND_AC97_POWER_SAVE
static void do_update_power(void *data)
static void do_update_power(struct work_struct *work)
{
update_power_regs(data);
update_power_regs(
container_of(work, struct snd_ac97, power_work.work));
}
#endif
@ -1989,7 +1990,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
mutex_init(&ac97->page_mutex);
#ifdef CONFIG_SND_AC97_POWER_SAVE
ac97->power_workq = create_workqueue("ac97");
INIT_WORK(&ac97->power_work, do_update_power, ac97);
INIT_DELAYED_WORK(&ac97->power_work, do_update_power);
#endif
#ifdef CONFIG_PCI

View file

@ -272,10 +272,11 @@ EXPORT_SYMBOL(snd_hda_queue_unsol_event);
/*
* process queueud unsolicited events
*/
static void process_unsol_events(void *data)
static void process_unsol_events(struct work_struct *work)
{
struct hda_bus *bus = data;
struct hda_bus_unsolicited *unsol = bus->unsol;
struct hda_bus_unsolicited *unsol =
container_of(work, struct hda_bus_unsolicited, work);
struct hda_bus *bus = unsol->bus;
struct hda_codec *codec;
unsigned int rp, caddr, res;
@ -314,7 +315,8 @@ static int init_unsol_queue(struct hda_bus *bus)
kfree(unsol);
return -ENOMEM;
}
INIT_WORK(&unsol->work, process_unsol_events, bus);
INIT_WORK(&unsol->work, process_unsol_events);
unsol->bus = bus;
bus->unsol = unsol;
return 0;
}

View file

@ -206,6 +206,7 @@ struct hda_bus_unsolicited {
/* workqueue */
struct workqueue_struct *workq;
struct work_struct work;
struct hda_bus *bus;
};
/*

View file

@ -942,10 +942,11 @@ static void check_mute(struct snd_pmac *chip, struct pmac_gpio *gp, int val, int
}
static struct work_struct device_change;
static struct snd_pmac *device_change_chip;
static void device_change_handler(void *self)
static void device_change_handler(struct work_struct *work)
{
struct snd_pmac *chip = self;
struct snd_pmac *chip = device_change_chip;
struct pmac_tumbler *mix;
int headphone, lineout;
@ -1417,7 +1418,8 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
chip->resume = tumbler_resume;
#endif
INIT_WORK(&device_change, device_change_handler, (void *)chip);
INIT_WORK(&device_change, device_change_handler);
device_change_chip = chip;
#ifdef PMAC_SUPPORT_AUTOMUTE
if ((mix->headphone_irq >=0 || mix->lineout_irq >= 0)