@@ -2298,7 +2298,7 @@ EXPORT_SYMBOL_GPL(rt5640_detect_headset);
2298
2298
static void rt5640_jack_work (struct work_struct * work )
2299
2299
{
2300
2300
struct rt5640_priv * rt5640 =
2301
- container_of (work , struct rt5640_priv , jack_work );
2301
+ container_of (work , struct rt5640_priv , jack_work . work );
2302
2302
struct snd_soc_component * component = rt5640 -> component ;
2303
2303
int status ;
2304
2304
@@ -2381,7 +2381,7 @@ static void rt5640_jack_work(struct work_struct *work)
2381
2381
* disabled the OVCD IRQ, the IRQ pin will stay high and as
2382
2382
* we react to edges, we miss the unplug event -> recheck.
2383
2383
*/
2384
- queue_work (system_long_wq , & rt5640 -> jack_work );
2384
+ queue_delayed_work (system_long_wq , & rt5640 -> jack_work , 0 );
2385
2385
}
2386
2386
}
2387
2387
@@ -2390,7 +2390,7 @@ static irqreturn_t rt5640_irq(int irq, void *data)
2390
2390
struct rt5640_priv * rt5640 = data ;
2391
2391
2392
2392
if (rt5640 -> jack )
2393
- queue_work (system_long_wq , & rt5640 -> jack_work );
2393
+ queue_delayed_work (system_long_wq , & rt5640 -> jack_work , 0 );
2394
2394
2395
2395
return IRQ_HANDLED ;
2396
2396
}
@@ -2399,7 +2399,7 @@ static void rt5640_cancel_work(void *data)
2399
2399
{
2400
2400
struct rt5640_priv * rt5640 = data ;
2401
2401
2402
- cancel_work_sync (& rt5640 -> jack_work );
2402
+ cancel_delayed_work_sync (& rt5640 -> jack_work );
2403
2403
cancel_delayed_work_sync (& rt5640 -> bp_work );
2404
2404
}
2405
2405
@@ -2508,7 +2508,7 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component,
2508
2508
}
2509
2509
2510
2510
/* sync initial jack state */
2511
- queue_work (system_long_wq , & rt5640 -> jack_work );
2511
+ queue_delayed_work (system_long_wq , & rt5640 -> jack_work , 0 );
2512
2512
}
2513
2513
2514
2514
static void rt5640_enable_hda_jack_detect (
@@ -2546,7 +2546,7 @@ static void rt5640_enable_hda_jack_detect(
2546
2546
}
2547
2547
2548
2548
/* sync initial jack state */
2549
- queue_work (system_long_wq , & rt5640 -> jack_work );
2549
+ queue_delayed_work (system_long_wq , & rt5640 -> jack_work , 0 );
2550
2550
}
2551
2551
2552
2552
static int rt5640_set_jack (struct snd_soc_component * component ,
@@ -2745,7 +2745,7 @@ static int rt5640_resume(struct snd_soc_component *component)
2745
2745
snd_soc_component_write (component , RT5640_DUMMY2 ,
2746
2746
0x4001 );
2747
2747
2748
- queue_work (system_long_wq , & rt5640 -> jack_work );
2748
+ queue_delayed_work (system_long_wq , & rt5640 -> jack_work , 0 );
2749
2749
}
2750
2750
2751
2751
return 0 ;
@@ -2950,7 +2950,7 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
2950
2950
rt5640 -> hp_mute = true;
2951
2951
rt5640 -> irq = i2c -> irq ;
2952
2952
INIT_DELAYED_WORK (& rt5640 -> bp_work , rt5640_button_press_work );
2953
- INIT_WORK (& rt5640 -> jack_work , rt5640_jack_work );
2953
+ INIT_DELAYED_WORK (& rt5640 -> jack_work , rt5640_jack_work );
2954
2954
2955
2955
/* Make sure work is stopped on probe-error / remove */
2956
2956
ret = devm_add_action_or_reset (& i2c -> dev , rt5640_cancel_work , rt5640 );
0 commit comments