lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] i2c: designware: Convert PCI driver to use shutdown hook
On Mon, May 04, 2026 at 08:15:03PM +0000, William A. Kennington III wrote:
> Convert the PCI driver to use the new i2c_dw_shutdown() hook, allowing
> the controller to gracefully NACK master requests during system shutdown.

...

> +static void i2c_dw_pci_shutdown(struct pci_dev *pdev)
> +{
> + struct dw_i2c_dev *i_dev = pci_get_drvdata(pdev);
> +
> + if (!i_dev)
> + return;

In long term this is bad style from maintenance perspective. Use

struct dw_i2c_dev *i_dev;

i_dev = pci_get_drvdata(pdev);
if (!i_dev)
return;

> + pm_runtime_disable(&pdev->dev);
> + if (!pm_runtime_status_suspended(&pdev->dev))
> + i2c_dw_shutdown(i_dev);
> +}

...

> - .driver = {

> + .driver = {

Stray change.

--
With Best Regards,
Andy Shevchenko



\
 
 \ /
  Last update: 2026-05-05 09:33    [W:0.108 / U:0.067 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog