[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0559c93256ae4f59aed278912bcbfd996e279839.camel@linux.intel.com>
Date: Tue, 31 Jul 2018 17:23:04 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Wolfram Sang <wsa@...-dreams.de>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
James Hogan <jhogan@...nel.org>
Cc: Paul Burton <paul.burton@...s.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Allan Nielsen <allan.nielsen@...rosemi.com>
Subject: Re: [PATCH v2 1/6] i2c: designware: use generic table matching
On Tue, 2018-07-31 at 17:02 +0300, Andy Shevchenko wrote:
> On Tue, 2018-07-31 at 15:47 +0200, Alexandre Belloni wrote:
> > Switch to device_get_match_data in probe to match the device
> > specific
> > data
> > instead of using the acpi specific function.
> >
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Oops. See below.
> > - id = acpi_match_device(pdev->dev.driver->acpi_match_table,
> > &pdev->dev);
> > - if (id && id->driver_data)
> > - dev->flags |= (u32)id->driver_data;
It seems you forgot to remove unused variable.
> > -
> > if (acpi_bus_get_device(handle, &adev))
> > return -ENODEV;
> >
> > @@ -269,6 +265,8 @@ static int dw_i2c_plat_probe(struct
> > platform_device *pdev)
> > else
> > i2c_parse_fw_timings(&pdev->dev, t, false);
> >
> > + dev->flags |= (u32)device_get_match_data(&pdev->dev);
> > +
And since it would be changed anyway, can you actually move this line
closet to if (has_acpi_companion()) one ?
> > acpi_speed = i2c_acpi_find_bus_speed(&pdev->dev);
> > /*
> > * Some DSTDs use a non standard speed, round down to the
> > lowest
>
>
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists