29
29
30
30
#define SC16IS7XX_NAME "sc16is7xx"
31
31
#define SC16IS7XX_MAX_DEVS 8
32
+ #define SC16IS7XX_MAX_PORTS 2 /* Maximum number of UART ports per IC. */
32
33
33
34
/* SC16IS7XX register definitions */
34
35
#define SC16IS7XX_RHR_REG (0x00) /* RX FIFO */
@@ -1398,7 +1399,7 @@ static void sc16is7xx_setup_irda_ports(struct sc16is7xx_port *s)
1398
1399
int i ;
1399
1400
int ret ;
1400
1401
int count ;
1401
- u32 irda_port [2 ];
1402
+ u32 irda_port [SC16IS7XX_MAX_PORTS ];
1402
1403
struct device * dev = s -> p [0 ].port .dev ;
1403
1404
1404
1405
count = device_property_count_u32 (dev , "irda-mode-ports" );
@@ -1425,7 +1426,7 @@ static int sc16is7xx_setup_mctrl_ports(struct sc16is7xx_port *s,
1425
1426
int i ;
1426
1427
int ret ;
1427
1428
int count ;
1428
- u32 mctrl_port [2 ];
1429
+ u32 mctrl_port [SC16IS7XX_MAX_PORTS ];
1429
1430
struct device * dev = s -> p [0 ].port .dev ;
1430
1431
1431
1432
count = device_property_count_u32 (dev , "nxp,modem-control-line-ports" );
@@ -1727,7 +1728,7 @@ static unsigned int sc16is7xx_regmap_port_mask(unsigned int port_id)
1727
1728
static int sc16is7xx_spi_probe (struct spi_device * spi )
1728
1729
{
1729
1730
const struct sc16is7xx_devtype * devtype ;
1730
- struct regmap * regmaps [2 ];
1731
+ struct regmap * regmaps [SC16IS7XX_MAX_PORTS ];
1731
1732
unsigned int i ;
1732
1733
int ret ;
1733
1734
@@ -1798,7 +1799,7 @@ MODULE_ALIAS("spi:sc16is7xx");
1798
1799
static int sc16is7xx_i2c_probe (struct i2c_client * i2c )
1799
1800
{
1800
1801
const struct sc16is7xx_devtype * devtype ;
1801
- struct regmap * regmaps [2 ];
1802
+ struct regmap * regmaps [SC16IS7XX_MAX_PORTS ];
1802
1803
unsigned int i ;
1803
1804
1804
1805
devtype = i2c_get_match_data (i2c );
0 commit comments