lkml.org 
[lkml]   [2022]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] pinctrl: ocelot: Fix interrupt controller
On Fri, Sep 9, 2022 at 5:55 PM Horatiu Vultur
<horatiu.vultur@microchip.com> wrote:

Thanks for an update, my comments below.

...

> - dev_set_drvdata(dev, info->map);
> + dev_set_drvdata(dev, info);

I would also change it to platform_set_drvdata() to keep symmetry with
->remove().

...

> +static int ocelot_pinctrl_remove(struct platform_device *pdev)
> +{
> + struct ocelot_pinctrl *info = platform_get_drvdata(pdev);

> + destroy_workqueue(info->wq);

Is it a synchronous operation? Anyway, what does guarantee that after
this no other task can schedule a new work due to unmasking an
interrupt? I think you need to be sure your device is quiescent before
killing that workqueue. Something like synchronize_irq() +
disable_irq() or equivalent? (I don't know for sure, you need to
investigate it yourself and find the best suitable way).

> + return 0;
> +}

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-09-09 17:09    [W:0.165 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site