Re: [PATCH v6 4/4] spi: cs42l43: Add bridged cs35l56 amplifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 15, 2024 at 07:17:16PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 15, 2024 at 5:09 PM Charles Keepax
> <ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > From: Maciej Strozek <mstrozek@xxxxxxxxxxxxxxxxxxxxx>
> > +static int cs42l43_spi_remove(struct platform_device *pdev)
> > +{
> > +       struct cs42l43 *cs42l43 = dev_get_drvdata(pdev->dev.parent);
> > +       struct fwnode_handle *fwnode = dev_fwnode(cs42l43->dev);
> > +       bool has_sidecar = cs42l43_has_sidecar(fwnode);
> > +
> > +       if (has_sidecar)
> > +               software_node_unregister(&cs42l43_gpiochip_swnode);
> > +
> > +       return 0;
> 
> As this one.
> 
> > +};
> 
> You will remove the software node before removing the controller, this
> seems incorrect ordering to me. What you need is to wrap by
> devm_add_action_or_reset() and it won't be any remove() callback
> needed.
> 

Yeah this is a good idea I will update.

Thanks,
Charles




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux