[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9c70e9265587b69c07629dfdfd2ea041c70acae.camel@linux.intel.com>
Date: Tue, 31 Jul 2018 17:04:31 +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 2/6] i2c: designware: move #ifdef CONFIG_OF to the top
On Tue, 2018-07-31 at 15:47 +0200, Alexandre Belloni wrote:
> Move the #ifdef CONFIG_OF section to the top of the file, after the
> ACPI
> section so functions defined there can be used in dw_i2c_plat_probe.
>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
> ---
> drivers/i2c/busses/i2c-designware-platdrv.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c
> b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 00bf62f77c47..ba142d7c0e05 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -157,6 +157,14 @@ static inline int dw_i2c_acpi_configure(struct
> platform_device *pdev)
> }
> #endif
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id dw_i2c_of_match[] = {
> + { .compatible = "snps,designware-i2c", },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
> +#endif
> +
> static void i2c_dw_configure_master(struct dw_i2c_dev *dev)
> {
> struct i2c_timings *t = &dev->timings;
> @@ -391,14 +399,6 @@ static int dw_i2c_plat_remove(struct
> platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_OF
> -static const struct of_device_id dw_i2c_of_match[] = {
> - { .compatible = "snps,designware-i2c", },
> - {},
> -};
> -MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
> -#endif
> -
> #ifdef CONFIG_PM_SLEEP
> static int dw_i2c_plat_prepare(struct device *dev)
> {
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists