File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2132,6 +2132,7 @@ static int ad4170_probe(struct spi_device *spi)
2132
2132
struct device * dev = & spi -> dev ;
2133
2133
struct iio_dev * indio_dev ;
2134
2134
struct ad4170_state * st ;
2135
+ const char * compat ;
2135
2136
int ret ;
2136
2137
2137
2138
indio_dev = devm_iio_device_alloc (& spi -> dev , sizeof (* st ));
@@ -2142,7 +2143,11 @@ static int ad4170_probe(struct spi_device *spi)
2142
2143
mutex_init (& st -> lock );
2143
2144
st -> spi = spi ;
2144
2145
2145
- indio_dev -> name = AD4170_NAME ;
2146
+ ret = device_property_read_string (dev , "compatible" , & compat );
2147
+ if (ret )
2148
+ return dev_err_probe (dev , ret , "Failed read device name\n" );
2149
+
2150
+ indio_dev -> name = compat ;
2146
2151
indio_dev -> modes = INDIO_DIRECT_MODE ;
2147
2152
indio_dev -> info = & ad4170_info ;
2148
2153
@@ -2206,6 +2211,7 @@ static int ad4170_probe(struct spi_device *spi)
2206
2211
static const struct of_device_id ad4170_of_match [] = {
2207
2212
{
2208
2213
.compatible = "adi,ad4170" ,
2214
+ .compatible = "adi,ad4190" ,
2209
2215
},
2210
2216
{ }
2211
2217
};
You can’t perform that action at this time.
0 commit comments