File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -1796,18 +1796,13 @@ MODULE_ALIAS("spi:sc16is7xx");
1796
1796
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
1797
1797
static int sc16is7xx_i2c_probe (struct i2c_client * i2c )
1798
1798
{
1799
- const struct i2c_device_id * id = i2c_client_get_device_id (i2c );
1800
1799
const struct sc16is7xx_devtype * devtype ;
1801
1800
struct regmap * regmaps [2 ];
1802
1801
unsigned int i ;
1803
1802
1804
- if (i2c -> dev .of_node ) {
1805
- devtype = device_get_match_data (& i2c -> dev );
1806
- if (!devtype )
1807
- return - ENODEV ;
1808
- } else {
1809
- devtype = (struct sc16is7xx_devtype * )id -> driver_data ;
1810
- }
1803
+ devtype = i2c_get_match_data (i2c );
1804
+ if (!devtype )
1805
+ return dev_err_probe (& i2c -> dev , - ENODEV , "Failed to match device\n" );
1811
1806
1812
1807
for (i = 0 ; i < devtype -> nr_uart ; i ++ ) {
1813
1808
regcfg .name = sc16is7xx_regmap_name (i );
You can’t perform that action at this time.
0 commit comments