Re: [PATCH v1 4/4] serial: sc16is7xx: Drop of_match_ptr() use

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

 



> There is an ACPI method to enumerate such devices via specific ACPI ID
> and use of compatible strings. It will not work for the drivers which
> have no OF match ID table present.
> 
> Reported-by: Georgii Staroselskii <georgii.staroselskii@xxxxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/sc16is7xx.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
> index 1b07beb4a583..3df9ea0d7b85 100644
> --- a/drivers/tty/serial/sc16is7xx.c
> +++ b/drivers/tty/serial/sc16is7xx.c
> @@ -16,7 +16,6 @@
>  #include <linux/i2c.h>
>  #include <linux/mod_devicetable.h>
>  #include <linux/module.h>
> -#include <linux/of.h>
>  #include <linux/property.h>
>  #include <linux/regmap.h>
>  #include <linux/serial_core.h>
> @@ -1433,7 +1432,7 @@ MODULE_DEVICE_TABLE(spi, sc16is7xx_spi_id_table);
>  static struct spi_driver sc16is7xx_spi_uart_driver = {
>  	.driver = {
>  		.name		= SC16IS7XX_NAME,
> -		.of_match_table	= of_match_ptr(sc16is7xx_dt_ids),
> +		.of_match_table	= sc16is7xx_dt_ids,
>  	},
>  	.probe		= sc16is7xx_spi_probe,
>  	.remove		= sc16is7xx_spi_remove,
> @@ -1487,7 +1486,7 @@ MODULE_DEVICE_TABLE(i2c, sc16is7xx_i2c_id_table);
>  static struct i2c_driver sc16is7xx_i2c_uart_driver = {
>  	.driver = {
>  		.name		= SC16IS7XX_NAME,
> -		.of_match_table	= of_match_ptr(sc16is7xx_dt_ids),
> +		.of_match_table	= sc16is7xx_dt_ids,
>  	},
>  	.probe		= sc16is7xx_i2c_probe,
>  	.remove		= sc16is7xx_i2c_remove,
> -- 
> 2.19.2
> 

Tested-By: Georgii Staroselskii <georgii.staroselskii@xxxxxxxxx>



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux