Skip to content

Commit

Permalink
extcon: extcon-pd-virtual: add vpd->irq_lock initialisation
Browse files Browse the repository at this point in the history
This fixes the follwing error.
  [   22.309582] BUG: spinlock bad magic on CPU#4, irq/107-virtual/297
  [   22.309618]  lock: 0xffff0000071cb2b8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
  [   22.309633] CPU: 4 PID: 297 Comm: irq/107-virtual Not tainted 5.10.110-52-rockchip radxa#52
  [   22.309636] Hardware name: Radxa ROCK 4C+ (DT)
  [   22.309641] Call trace:
  [   22.309652]  dump_backtrace+0x0/0x1b4
  [   22.309656]  show_stack+0x24/0x30
  [   22.309663]  dump_stack_lvl+0xc8/0xf8
  [   22.309667]  dump_stack+0x18/0x34
  [   22.309674]  spin_bug+0x90/0xb4
  [   22.309678]  do_raw_spin_lock+0x44/0xe0
  [   22.309684]  _raw_spin_lock_irqsave+0x30/0x44
  [   22.309700]  vpd_irq_disable+0x30/0x80 [extcon_pd_virtual]
  [   22.309706]  dp_det_irq_handler+0x4c/0x60 [extcon_pd_virtual]
  [   22.309714]  irq_thread_fn+0x38/0x80
  [   22.309717]  irq_thread+0xec/0x198
  [   22.309723]  kthread+0xf8/0x108
  [   22.309728]  ret_from_fork+0x10/0x30

Signed-off-by: Stephen <[email protected]>
  • Loading branch information
RadxaStephen committed Mar 9, 2023
1 parent f101107 commit ec1f00a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/extcon/extcon-pd-virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ static int vpd_extcon_probe(struct platform_device *pdev)
}

vpd_extcon_init(vpd);
spin_lock_init(&vpd->irq_lock);
INIT_DELAYED_WORK(&vpd->irq_work, extcon_pd_delay_irq_work);

vpd->irq=gpiod_to_irq(vpd->gpio_irq);
Expand Down

0 comments on commit ec1f00a

Please sign in to comment.