mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and delayed_work structs. Three places that enqueue bits of their stack and then return have been marked with #error as this is not permitted. Signed-Off-By: David Howells <[email protected]>
This commit is contained in:
parent
9db7372445
commit
6d5aefb8ea
34 changed files with 154 additions and 121 deletions
|
|
@ -60,16 +60,16 @@ static int sharpsl_ac_check(void);
|
|||
static int sharpsl_fatal_check(void);
|
||||
static int sharpsl_average_value(int ad);
|
||||
static void sharpsl_average_clear(void);
|
||||
static void sharpsl_charge_toggle(void *private_);
|
||||
static void sharpsl_battery_thread(void *private_);
|
||||
static void sharpsl_charge_toggle(struct work_struct *private_);
|
||||
static void sharpsl_battery_thread(struct work_struct *private_);
|
||||
|
||||
|
||||
/*
|
||||
* Variables
|
||||
*/
|
||||
struct sharpsl_pm_status sharpsl_pm;
|
||||
DECLARE_WORK(toggle_charger, sharpsl_charge_toggle, NULL);
|
||||
DECLARE_WORK(sharpsl_bat, sharpsl_battery_thread, NULL);
|
||||
DECLARE_DELAYED_WORK(toggle_charger, sharpsl_charge_toggle);
|
||||
DECLARE_DELAYED_WORK(sharpsl_bat, sharpsl_battery_thread);
|
||||
DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger);
|
||||
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ void sharpsl_battery_kick(void)
|
|||
EXPORT_SYMBOL(sharpsl_battery_kick);
|
||||
|
||||
|
||||
static void sharpsl_battery_thread(void *private_)
|
||||
static void sharpsl_battery_thread(struct work_struct *private_)
|
||||
{
|
||||
int voltage, percent, apm_status, i = 0;
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ static void sharpsl_battery_thread(void *private_)
|
|||
/* Corgi cannot confirm when battery fully charged so periodically kick! */
|
||||
if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON)
|
||||
&& time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL))
|
||||
schedule_work(&toggle_charger);
|
||||
schedule_delayed_work(&toggle_charger, 0);
|
||||
|
||||
while(1) {
|
||||
voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
|
||||
|
|
@ -212,7 +212,7 @@ static void sharpsl_charge_off(void)
|
|||
sharpsl_pm_led(SHARPSL_LED_OFF);
|
||||
sharpsl_pm.charge_mode = CHRG_OFF;
|
||||
|
||||
schedule_work(&sharpsl_bat);
|
||||
schedule_delayed_work(&sharpsl_bat, 0);
|
||||
}
|
||||
|
||||
static void sharpsl_charge_error(void)
|
||||
|
|
@ -222,7 +222,7 @@ static void sharpsl_charge_error(void)
|
|||
sharpsl_pm.charge_mode = CHRG_ERROR;
|
||||
}
|
||||
|
||||
static void sharpsl_charge_toggle(void *private_)
|
||||
static void sharpsl_charge_toggle(struct work_struct *private_)
|
||||
{
|
||||
dev_dbg(sharpsl_pm.dev, "Toogling Charger at time: %lx\n", jiffies);
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ static void sharpsl_ac_timer(unsigned long data)
|
|||
else if (sharpsl_pm.charge_mode == CHRG_ON)
|
||||
sharpsl_charge_off();
|
||||
|
||||
schedule_work(&sharpsl_bat);
|
||||
schedule_delayed_work(&sharpsl_bat, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -279,10 +279,10 @@ static void sharpsl_chrg_full_timer(unsigned long data)
|
|||
sharpsl_charge_off();
|
||||
} else if (sharpsl_pm.full_count < 2) {
|
||||
dev_dbg(sharpsl_pm.dev, "Charge Full: Count too low\n");
|
||||
schedule_work(&toggle_charger);
|
||||
schedule_delayed_work(&toggle_charger, 0);
|
||||
} else if (time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_FINISH_TIME)) {
|
||||
dev_dbg(sharpsl_pm.dev, "Charge Full: Interrupt generated too slowly - retry.\n");
|
||||
schedule_work(&toggle_charger);
|
||||
schedule_delayed_work(&toggle_charger, 0);
|
||||
} else {
|
||||
sharpsl_charge_off();
|
||||
sharpsl_pm.charge_mode = CHRG_DONE;
|
||||
|
|
|
|||
|
|
@ -323,7 +323,8 @@ static int h3_transceiver_mode(struct device *dev, int mode)
|
|||
|
||||
cancel_delayed_work(&irda_config->gpio_expa);
|
||||
PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
|
||||
schedule_work(&irda_config->gpio_expa);
|
||||
#error this is not permitted - mode is an argument variable
|
||||
schedule_delayed_work(&irda_config->gpio_expa, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ static struct omap_kp_platform_data nokia770_kp_data = {
|
|||
.rows = 8,
|
||||
.cols = 8,
|
||||
.keymap = nokia770_keymap,
|
||||
.keymapsize = ARRAY_SIZE(nokia770_keymap)
|
||||
.keymapsize = ARRAY_SIZE(nokia770_keymap),
|
||||
.delay = 4,
|
||||
};
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ static void nokia770_audio_pwr_up(void)
|
|||
printk("HP connected\n");
|
||||
}
|
||||
|
||||
static void codec_delayed_power_down(void *arg)
|
||||
static void codec_delayed_power_down(struct work_struct *work)
|
||||
{
|
||||
down(&audio_pwr_sem);
|
||||
if (audio_pwr_state == -1)
|
||||
|
|
@ -200,7 +200,7 @@ static void codec_delayed_power_down(void *arg)
|
|||
up(&audio_pwr_sem);
|
||||
}
|
||||
|
||||
static DECLARE_WORK(codec_power_down_work, codec_delayed_power_down, NULL);
|
||||
static DECLARE_DELAYED_WORK(codec_power_down_work, codec_delayed_power_down);
|
||||
|
||||
static void nokia770_audio_pwr_down(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ static u8 hw_led_state;
|
|||
|
||||
static u8 tps_leds_change;
|
||||
|
||||
static void tps_work(void *unused)
|
||||
static void tps_work(struct work_struct *unused)
|
||||
{
|
||||
for (;;) {
|
||||
u8 leds;
|
||||
|
|
@ -61,7 +61,7 @@ static void tps_work(void *unused)
|
|||
}
|
||||
}
|
||||
|
||||
static DECLARE_WORK(work, tps_work, NULL);
|
||||
static DECLARE_WORK(work, tps_work);
|
||||
|
||||
#ifdef CONFIG_OMAP_OSK_MISTRAL
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,8 @@ static int h4_transceiver_mode(struct device *dev, int mode)
|
|||
|
||||
cancel_delayed_work(&irda_config->gpio_expa);
|
||||
PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
|
||||
schedule_work(&irda_config->gpio_expa);
|
||||
#error this is not permitted - mode is an argument variable
|
||||
schedule_delayed_work(&irda_config->gpio_expa, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ I2C_CLIENT_INSMOD;
|
|||
|
||||
static int max7310_write(struct i2c_client *client, int address, int data);
|
||||
static struct i2c_client max7310_template;
|
||||
static void akita_ioexp_work(void *private_);
|
||||
static void akita_ioexp_work(struct work_struct *private_);
|
||||
|
||||
static struct device *akita_ioexp_device;
|
||||
static unsigned char ioexp_output_value = AKITA_IOEXP_IO_OUT;
|
||||
DECLARE_WORK(akita_ioexp, akita_ioexp_work, NULL);
|
||||
DECLARE_WORK(akita_ioexp, akita_ioexp_work);
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -158,7 +158,7 @@ void akita_reset_ioexp(struct device *dev, unsigned char bit)
|
|||
EXPORT_SYMBOL(akita_set_ioexp);
|
||||
EXPORT_SYMBOL(akita_reset_ioexp);
|
||||
|
||||
static void akita_ioexp_work(void *private_)
|
||||
static void akita_ioexp_work(struct work_struct *private_)
|
||||
{
|
||||
if (akita_ioexp_device)
|
||||
max7310_set_ouputs(akita_ioexp_device, ioexp_output_value);
|
||||
|
|
|
|||
Loading…
Reference in a new issue